学习手札:加强Suse Linux操作系统安全
创始人
2024-06-13 05:11:00
0

本文向大家介绍Suse Linux,可能好多人还不了解Suse Linux,没有关系,看完本文你肯定有不少收获。下面就来详解一下所遇到的问题,在Suse Linux操作系统安装完成以后,需要安全扫描,把没有使用的端口关闭,加强操作系统的安全。以下就是其操作步骤:

一、系统默认启动服务:
shelly:/etc/init.d # nmap -P0 127.0.0.1
Starting Nmap 4.00 ( [url]http://www.insecure.org/nmap/[/url] ) at 2007-06-25 15:34 CST
Interesting ports on localhost (127.0.0.1):
(The 1666 ports scanned but not shown below are in state: closed)
PORT    STATE SERVICE
22/tcp  open  ssh
25/tcp  open  smtp
111/tcp open  rpcbind
427/tcp open  svrloc
631/tcp open  ipp
Nmap finished: 1 IP address (1 host up) scanned in 0.244 seconds
shelly:/etc/init.d #

二、临时关闭服务方法:

1、查看服务和端口关联关系:
比如查看ipp服务的关联进程:#lsof |grep ipp

2、确认服务和端口的关联关系:
序列端口服务路径/etc/init.d状态
1)22ssh sshd保留
2)25smtppostfix关闭
3)111rpcportmap关闭
4)427svrlocslpd关闭
5)631ippcupsd关闭

3、手动关闭方法:
停止smtp:/etc/init.d/postfix stop
停止rpc:/etc/init.d/portmap stop
停止svrloc:/etc/init.d/slpd stop
停止ipp:/etc/init.d/cupsd stop

三、永久关闭方法:
手动关闭以后每次系统启动,服务还会自己启动,需要从启动配置文件永久禁止:
使用chkconfig –l命令查看现在系统的自动加载服务:(只截取相关的一部分服务)
shelly:/etc/init.d # chkconfig -l |grep on
cron      0:off  1:off  2:on   3:on   4:off  5:on   6:off
cups      0:off  1:off  2:on   3:on   4:off  5:on   6:off
nfs       0:off  1:off  2:off  3:on   4:off  5:on   6:off
nfsboot   0:off  1:off  2:off  3:on   4:off  5:on   6:off
novell-zmd0:off  1:off  2:off  3:on   4:on   5:on   6:off
nscd      0:off  1:off  2:off  3:on   4:off  5:on   6:off
portmap   0:off  1:off  2:off  3:on   4:off  5:on   6:off
postfix   0:off  1:off  2:off  3:on   4:off  5:on   6:off
powersaved0:off  1:off  2:on   3:on   4:off  5:on   6:off
random    0:off  1:off  2:on   3:on   4:off  5:on   6:off
resmgr    0:off  1:off  2:on   3:on   4:off  5:on   6:off
slpd      0:off  1:off  2:off  3:on   4:off  5:on   6:off
shelly:/etc/init.d #
关闭方法:
shelly:/etc/init.d # chkconfig -s cups off
shelly:/etc/init.d # chkconfig -s nfs off
shelly:/etc/init.d # chkconfig -s nfsboot off
shelly:/etc/init.d # chkconfig -s portmap off
shelly:/etc/init.d # shelly:/etc/init.d # chkconfig -s postfix off
shelly:/etc/init.d # chkconfig -s slpd off
备注:永久关闭portmap和nfs有关联,必须先关闭nfs和nfsboot进程,否则会有如下报错。
shelly:/etc/init.d # chkconfig -s portmap off
insserv: Service portmap has to be enabled for service nfs
insserv: Service portmap has to be enabled for service nfsboot
insserv: exiting now!
/sbin/insserv failed, exit code 1
支持停止顺序:
shelly:/etc/init.d # chkconfig -s nfs off
shelly:/etc/init.d # chkconfig -s nfsboot off
shelly:/etc/init.d # chkconfig -s portmap off
shelly:/etc/init.d #

四、扫描系统:
重新启动系统,扫描系统端口
shelly:/etc/init.d # nmap -P0 127.0.0.1
Starting Nmap 4.00 ( [url]http://www.insecure.org/nmap/[/url] ) at 2007-06-25 16:16 CST
Interesting ports on localhost (127.0.0.1):
(The 1670 ports scanned but not shown below are in state: closed)
PORT    STATE SERVICE
22/tcp  open  ssh
Nmap finished: 1 IP address (1 host up) scanned in 0.213 seconds
shelly:/etc/init.d #
看完本你是否了解了Suse Linux操作系统怎样加强操作系统的安全,希望本文会对你有所帮助。

【编辑推荐】

  1. 详解Suse YaST的问题
  2. 操作笔记:SUSE FAQ修改XWindows分辨率
  3. Open Suse Linux平台迁移好与坏
  4. 解决Suse中文编码问题知识
  5. 浅析Open Suse下的文件删除

相关内容

热门资讯

如何允许远程连接到MySQL数... [[277004]]【51CTO.com快译】默认情况下,MySQL服务器仅侦听来自localhos...
如何利用交换机和端口设置来管理... 在网络管理中,总是有些人让管理员头疼。下面我们就将介绍一下一个网管员利用交换机以及端口设置等来进行D...
施耐德电气数据中心整体解决方案... 近日,全球能效管理专家施耐德电气正式启动大型体验活动“能效中国行——2012卡车巡展”,作为该活动的...
20个非常棒的扁平设计免费资源 Apple设备的平面图标PSD免费平板UI 平板UI套件24平图标Freen平板UI套件PSD径向平...
德国电信门户网站可实时显示全球... 德国电信周三推出一个门户网站,直观地实时提供其安装在全球各地的传感器网络检测到的网络攻击状况。该网站...
为啥国人偏爱 Mybatis,... 关于 SQL 和 ORM 的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行...
《非诚勿扰》红人闫凤娇被曝厕所... 【51CTO.com 综合消息360安全专家提醒说,“闫凤娇”、“非诚勿扰”已经被黑客盯上成为了“木...
2012年第四季度互联网状况报... [[71653]]  北京时间4月25日消息,据国外媒体报道,全球知名的云平台公司Akamai Te...