Linux系统安全配置的一些规则-Linux服务器安全设置(6)
#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终端登录。
13. 特别的帐号
禁止所有默认的被操作系统本身启动的且不需要的帐号,当你第一次装上系统时就应该做此检查,
Linux提供了各种帐号,你可能不需要,如果你不需要这个帐号,就移走它,你有的帐号越多,就越容易
受到攻击。
为删除你系统上的用户,用下面的命令:
[root@deep]# userdel username
为删除你系统上的组用户帐号,用下面的命令:
[root@deep]# groupdel username
在终端上打入下面的命令删掉下面的用户。
[root@deep]# userdel adm
[root@deep]# userdel lp
[root@deep]# userdel sync
[root@deep]# userdel shutdown
[root@deep]# userdel halt
[root@deep]# userdel mail
如果你不用sendmail服务器,procmail.mailx,就删除这个帐号。
[root@deep]# userdel news
[root@deep]# userdel uucp
- ·Linux procinfo命令使用教程,学习procinfo命令的用法
- ·Linux spell命令使用教程,学习spell命令的用法及spel
- ·Linux df命令使用教程,学习df命令的用法及df命令语法
- ·Linux id命令使用教程,学习id命令的用法及id命令语法
- ·Linux dip命令使用教程学习,dip命令的用法与实例讲解
- ·Linux zipinfo命令使用教程学习,info命令语法动手详
- ·Linux sort命令使用教程学习惯,sort命令语法详细讲解
- ·Linux ar命令的用法及实例学习-ar命令语法的运用技巧
- ·Linux login命令的用法及实例讲解
- ·linux find命令使用教程及find命令的用法与实例讲解
- ·linux dump命令用法详解。dump命令学习心得。dump命令
- ·linux kill命令使用教程,kill函数命令学习心得。
- ·linux awk数组学习心得及awk数组操作详细介绍 用awk进
- ·Linux Unzip命令使用教程,Linux zip命令使用教程
- ·linux中echo命令详解学习,echo命令的使用方法。
- ·uniq命令详解-linux uniq语法使用教程学习-uniq的用法
- ·AngularJS入门教程-AngularJS教程-从零开始学习Angula
- ·AngularJS入门教程快速开始,从零开始学习AngularJS的
- ·AngularJS入门教程:导言和准备
- ·AngularJS入门教程00:引导程序
- ·AngularJS入门教程01:静态模板
- ·AngularJS入门教程02:AngularJS 模板
- ·AngularJS入门教程03:迭代器过滤
- ·AngularJS入门教程04:双向绑定