温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

怎么实现suse linux操作系统安全加固

发布时间:2021-10-21 18:47:12 来源:亿速云 阅读:172 作者:柒染 栏目:云计算

这篇文章给大家介绍怎么实现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)        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(在rhel中chkconfig --list|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-zmd                0: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
powersaved                0: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 #

本帖最后由 solaris小兵

补充:
zmd到现在一直都有问题,占用大量系统资源不说,升级还老是出现莫名其妙的依赖性错误。

>su - root
#rpm -e zmd rug zen-updater

然后重启,会见到SUSE10里面熟悉的opensuseupdater(默认安装了)
可以执行在线自动检查更新等等功能.

关于怎么实现suse linux操作系统安全加固就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI