北京金同方计算机培训,考试认证
当前位置:中招首页 -> IT培训 -> 国外认证 -> Linux认证 -> 复习指导 -> 
经典文档:Linux网络服务器配置详解(4)

2005-11-15 16:13:11 来源:未知
在任何的网络环境中使用Linux系统,第一件要做的事就是了解一下服务器到底要提供哪些服务。不需要的那些服务应该被禁止掉,最好卸载掉,这样黑客就少了一些攻击系统的机会。

  查看“/etc/inetd.conf”文件,了解一下inetd提供哪些服务。用加上注释的方法(在一行的开头加上#号),禁止任何不需要的服务,再给inetd进程发一个SIGHUP信号。

  第一步:把文件的许可权限改成600。

[root@deep]# chmod 600 /etc/inetd.conf

  第二步:确信文件的所有者是root。

[root@deep]# stat /etc/inetd.conf

  第三步:编辑“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
   关键词  >>Linux认证
 
新世纪电脑培训学校
北京新华电脑学校
百事特教育学院
金同方计算机学校
北大燕工教育研究院
中科院计算所培训中心

  ■ 最新推荐课程

 ·长城平面设计师就业专修课程  ·育人电脑组装维修培训课程  ·新科海三维设计师就业班课程
 ·中科院JAVA软件工程师培训课程  ·中科院计计算机网络系统集成  ·千禧艺海高级三维室内装潢设计
 ·金同方高级文秘助理实战课程  ·科华时代 3ds max设计师课程  ·北京交通大学日语软件工程师
相关文章
 ·Novell Linux认证工程师(CLE)
 ·Linux认证考试
 ·Linux认证
 ·xIT-Linux认证-考试心得-bell-
 ·选择Linux认证的N个理由
论坛热贴
 【发表评论】
 昵称:
 内容:
 
 【最新评论】 更多...
中招在线版权与免责声明:
① 凡本站注明“稿件来源:中招在线”的所有文字、图片和音视频稿件,版权均属本网所有,任何媒体、网站或个人未经本网协议授权不得转载、链接、转贴或以其他方式复制发表。已经本站协议授权的媒体、网站,在下载使用时必须注明"稿件来源:中招在线",违者本站将依法追究责任。
② 本站注明稿件来源为其他媒体的文/图等稿件均为转载稿,本站转载出于非商业性的教育和科研之目的,并不意味着赞同其观点或证实其内容的真实性。如转载稿涉及版权等问题,请作者在两周内速来电或来函联系。
热 点 聚 焦
Google
   
精 彩 推 荐
免费下载Firefox,改进网页浏览
免费下载相片软件整理你的照片
·新科海平面设计师就业课程
·新科海软件测试工程师课程
·理工百事特软件编程课程
·百事特装饰装潢设计师课程
·J2EE Struts及XML编程技术
·千禧艺海影视后期特效课程
·JAVA软件开发专业课程
·清华万博1+6网络技术总监
·中科院企业VI平面广告课程
·中科院VC++ 6.0/VC++.Net
 
本周院校排行榜
最新资源排行榜
 
 
关于中招 - 广告服务 - 网站建设 - 版权声明 - 联系我们 - 英才加盟 - 网站地图 - 友情链接 - 免责声明 - 设为首页
Copyright @ 2005-2008 zhongzhao.com All Rights Reserved.
中招在线 版权所有