大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 操作系统 -> Linux -> 经典文档:Linux网络服务器配置详解(3)

经典文档:Linux网络服务器配置详解(3)

时间: 2021-07-31 作者:daque

第三步:编纂“inetd.conf”文献(vi /etc/inetd.conf),遏止一切不须要的效劳,如:ftp、 telnet、 shell、 login、 exec、talk、ntalk、 imap、 pop-2、pop-3、finger、auth,之类。   即使你感触某些效劳有效,不妨不由止那些效劳。然而,把那些效劳遏止掉,体例受报复的大概性就会小很多。变换后的“inetd.conf”文献的实质如底下所示: # to re-read this file after changes, just do a 'killall -hup inetd' # #echo stream tcp nowait root internal #echo dgram udp wait root internal #discard stream tcp nowait root internal #discard dgram udp wait root internal #daytime stream tcp nowait root internal #daytime dgram udp wait root internal #chargen stream tcp nowait root internal #chargen dgram udp wait root internal #time stream tcp nowait root internal #time dgram udp wait root internal # # these are standard services. # #ftp stream tcp nowait root/usr/sbin/tcpd in.ftpd -l -a #telnet stream tcp nowait root/usr/sbin/tcpd in.telnetd # # shell, login, exec, comsat and talk are bsd protocols. # #shell stream tcp nowait root/usr/sbin/tcpd in.rshd #login stream tcp nowait root /usr/sbin/tcpd in.rlogind #exec stream tcp nowait root /usr/sbin/tcpd in.rexecd #comsat dgram udp wait root /usr/sbin/tcpd in.comsat #talk dgram udp wait root /usr/sbin/tcpd in.talkd #ntalk dgram udp wait root /usr/sbin/tcpd in.ntalkd #dtalk stream tcp wait nobody /usr/sbin/tcpd in.dtalkd # # pop and imap mail services et al # #pop-2 stream tcp nowait root /usr/sbin/tcpd ipop2d #pop-3 stream tcp nowait root /usr/sbin/tcpd ipop3d #imap stream tcp nowait root /usr/sbin/tcpd imapd # # the internet uucp service. # #uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico -l # # tftp service is provided primarily for booting. most sites # run this only on machines acting as"boot servers." do not uncomment # this unless you *need* it. # #tftp dgram udp wait root/usr/sbin/tcpd in.tftpd #bootps dgram udp wait root /usr/sbin/tcpd bootpd # # finger, systat and netstat give out user information which may be # valuable to potential "system crackers."many sites choose to disable # some or all of these services to improve security. # #finger stream tcp nowait root /usr/sbin/tcpd in.fingerd #cfinger stream tcp nowait root /usr/sbin/tcpd in.cfingerd   #systat stream tcp nowait guest /usr/sbin/tcpd /bin/ps -auwwx   #netstat stream tcp nowait guest /usr/sbin/tcpd /bin/netstat -f inet   #   # authentication   #   #auth stream tcp nowait nobody/usr/sbin/in.identd in.identd -l -e -o   #   # end of inetd.conf提防:变换了“inetd.conf”文献之后,别忘了给inetd过程发一个sighup旗号(killall –hup inetd)。

[root@deep /root]# killall -hup inetd

  第四步:   为了保护“inetd.conf”文献的安定,不妨用chattr吩咐把它设成不行变换。把文献设成不行变换的只有用底下的吩咐:

[root@deep]# chattr +i /etc/inetd.conf如许不妨制止“inetd.conf”文献的任何变换(不料或是其余因为)。一个有“i”属性的文献是不许被变换的:不许简略或重定名,不许创造这个文献的链接,不许往这个文献里写数据。惟有体例处置员本领树立和废除这个属性。即使要变换inetd.conf文献,你必需先废除这个不承诺变换的标记: [root@deep]# chattr -i /etc/inetd.conf

  然而对于诸如sendmail,named,www等效劳,因为它们不象finger,telnet等效劳,在乞求到来时由inet保护过程启用相映的过程供给效劳,而是在体例启用时,动作保护过程运转的。   而对于redhat linux,供给了一个linuxconfig吩咐,不妨经过它在图形界面下交互式地树立能否在启用时运转关系效劳。也不妨经过吩咐来树立能否启用时启用某个效劳,如:[root@deep]# chkconfig –level 35 named off。

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.