中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档 | 网通镜像
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 操作系统 > Linux > LinuxUnix安全
Linux操作系统安全配置步骤详细解析(2)
作者:佚名 时间:2007-08-25 21:55 出处:中国IT实验室 责编:月夜寒箫
              摘要:Linux操作系统安全配置步骤详细解析(2)
7. TCP_WRAPPERS

默认地,Redhat Linux允许所有的请求,用TCP_WRAPPERS增强你的站点的安全性是举手

之劳,你可以放入

“ALL: ALL”到/etc/hosts.deny中禁止所有的请求,然后放那些明确允许的请求到

/etc/hosts.allow中,如:
sshd: 192.168.1.10/255.255.255.0 gate.openarch.com
            
对IP地址192.168.1.10和主机名gate.openarch.com,允许通过ssh连接。

配置完了之后,用tcpdchk检查
[root@deep]# tcpdchk
            
tcpchk是TCP_Wrapper配置检查工具,

它检查你的tcp wrapper配置并报告所有发现的潜在/存在的问题。

8. 别名文件aliases

编辑别名文件/etc/aliases(也可能是/etc/mail/aliases),移走/注释掉下面的行。
# Basic system aliases -- these MUST be present.
            MAILER-DAEMON: postmaster
            postmaster: root
            # General redirections for pseudo accounts.
            bin: root
            daemon: root
            #games: root ?remove or comment out.
            #ingres: root ?remove or comment out.
            nobody: root
            #system: root ?remove or comment out.
            #toor: root ?remove or comment out.
            #uucp: root ?remove or comment out.
            # Well-known aliases.
            #manager: root ?remove or comment out.
            #dumper: root ?remove or comment out.
            #operator: root ?remove or comment out.
            # trap decode to catch security attacks
            #decode: root
            # Person who should get root's mail
            #root: marc
            
最后更新后不要忘记运行/usr/bin/newaliases,使改变生效。

9.阻止你的系统响应任何从外部/内部来的ping请求。

既然没有人能ping通你的机器并收到响应,你可以大大增强你的站点的安全性。你可以加下面的一行命令到/etc/rc.d/rc.local,以使每次启动后自动运行。
echo 1 >; /proc/sys/net/ipv4/icmp_echo_ignore_all
            
10. 不要显示出操作系统和版本信息。

如果你希望某个人远程登录到你的服务器时不要显示操作系统和版本信息,你能改变

/etc/inetd.conf中的一行象下面这样:
telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd -h
            
加-h标志在最后使得telnet后台不要显示系统信息,而仅仅显示login:

11.The /etc/host.conf file

编辑host.conf文件(vi /etc/host.conf)且加下面的行:
# Lookup names via DNS first then fall back to /etc/hosts.
            order bind,hosts
            # We don't have machines with multiple IP addresses on the same card
            (like virtual server,IP Aliasing).
            multi off
            # Check for IP address spoofing.
            nospoof on
            IP Spoofing: IP-Spoofing is a security exploit that works by tricking
            computers in a trust relationship that you are someone that you really aren't.
            
12. The /etc/securetty file

该文件指定了允许root登录的tty设备,/etc/securetty被/bin/login程序读取,它的

格式是一行一个被允许的名字列表,如你可以编辑/etc/securetty且注释出下面的行。
tty1
            #tty2
            #tty3
            #tty4
            #tty5
            #tty6
            #tty7
            #tty8
            
意味着root仅仅被允许在tty1终端登录。
关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有