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/tcpopenssh
25/tcpopensmtp
111/tcp openrpcbind
427/tcp opensvrloc
631/tcp openipp
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) 22 ssh sshd 保留
2) 25 smtp postfix 关闭
3) 111 rpc portmap 关闭
4) 427 svrloc slpd 关闭
5) 631 ipp cupsd 关闭
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:off1:off2:on 3:on 4:off5:on 6:off
cups 0:off1:off2:on 3:on 4:off5:on 6:off
nfs 0:off1:off2:off3:on 4:off5:on 6:off
nfsboot 0:off1:off2:off3:on 4:off5:on 6:off
novell-zmd 0:off1:off2:off3:on 4:on 5:on 6:off
nscd 0:off1:off2:off3:on 4:off5:on 6:off
portmap 0:off1:off2:off3:on 4:off5:on 6:off
postfix 0:off1:off2:off3:on 4:off5:on 6:off
powersaved 0:off1:off2:on 3:on 4:off5:on 6:off
random 0:off1:off2:on 3:on 4:off5:on 6:off
resmgr 0:off1:off2:on 3:on 4:off5:on 6:off
slpd 0:off1:off2:off3:on 4:off5: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/tcpopenssh
Nmap finished: 1 IP address (1 host up) scanned in 0.213 seconds
shelly:/etc/init.d #
分享到:
相关推荐
SUSELinux主机安全加固通用操作指导书
SUSE LINUX主机安全加固,SUSE LINUX主机安全加固,SUSE LINUX主机安全加固
一线维护工程师和安全专业服务工程师进行SUSE LINUX系统管理和维护指南,有助于熟悉LINUX系统安全加固流程。
SUSE Linux操作系统脆弱性加固,非常好的文档,多个项目中的总结。
业务安全_SUSE_Linux_主机安全加固
SUSE Linux操作系统日常维护研究.pdf
包括安全加固实施、实施后严重、风险回退步骤。 安全加固实施包括账号、口令、服务、访问控制、日志审计、登录显示、IP...针对SUSE9.0 和10.0 版本,同样可以适用于其他版本的SUSE或者其他版本的Linux安全加固参考。
很有用的Linux SUSE 操作系统安装手册
linux-suse6.5操作系统下载 用于VMware虚拟机上,服务器上
日常进行开发安装虚拟机,需要Suse Linux操作系统,官网下载速度忒慢,特上传网盘资源,需要的伙伴可以下载
06-SUSE Linux安全加固
SUSE Linux Enterprise 12 SP5-Server-DVD-x86_64-GM-DVD1.iso SUSE Linux Enterprise 12 SP5-Server-DVD-x86_64-GM-DVD2.iso Raj Meel宣布了适用于SUSE Linux Enterprise 12的第五个服务包,这是该公司商业,企业...
Suselinux操作系统安装及技术维护巡检指引整理.pdf
suse linux 用户手册;爱好 suse linux 操作系统可以下载学习一下
SUSE Linux操作系统集成规范.docx
suse常用命令,日常应用的一些命令都是可以用的到的。
SuSE_Linux安全加固,保证你看了不后悔,绝对的好东西