黑客风云——风云网络
设为首页 加入收藏 我要投稿 网站地图

您现在的位置: 黑客风云 >> 黑客文章 >> 网管频道 >> *NIX网管 >> 正文
·完美空间提供500M免费AS04-10·企业安全之YY内网准入以04-09
·企业安全之意识与策略04-09·剑走偏锋:IIS漏洞利用04-09
·我来免费网提供100M免费04-09·1122mb.com提供20G超大免04-08
·映像劫持与反劫持技术04-07·让所有"暴力删除工具"无04-07
·入侵88red系统的详细过程04-07·Sql Injection脚本注入终04-07
·vbs+delphi 反弹后门生成04-07·飞讯网提供100MB免费PHP04-07
·突破SQL注入攻击时输入框04-04·结合内核和病毒技术的最04-04
·Real Player rmoc3260.d04-04·亿万网络今月最后为您提04-04
·php+mysql 5 sql inject04-03·Real Player rmoc3260.d04-03
·oblog文件下载漏洞04-03·免费啦提供1G-2G免费全能04-03
·完全解析网页后门和挂马04-02·一句话开3389(只测试过04-02
·萧萧免费空间网提供100M04-02·谷道免费空间网提供1G免04-01
·从本地入手解决双线路由03-31·sablog 1.6 多个跨站漏洞03-31
·富文本编辑器的跨站脚本03-31·Cookie注入是怎样产生的03-31
[推荐]Linux网络服务器配置基础详解发表日期
      ★★★★

Linux网络服务器配置基础详解发表日期

文章整理发布:黑客风云 文章来源:www.05112.com 更新时间:2006-6-1 9:56:27

如果你觉得某些服务有用,可以不禁止这些服务。但是,把这些服务禁止掉,系统受攻击的可能性就会小很多。改变后的“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。

上一页  [1] [2] [3] [4] 

文章录入:cainiaowang    责任编辑:cainiaowang 
【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
VIP 专 区
Copyright @2006 黑客风云 ●业务联系:QQ 联系怪人 联系奇人 Email:给怪人发邮件 给奇人发邮件
ICP备案:冀06009886