admin

Linux网络安全技巧(2)

admin 安全防护 2023-01-09 517浏览 0

Linux网络安全技巧之别名文件aliases

编辑别名文件/etc/aliases(也可能是/etc/mail/aliases),移走/注释掉下面的行。

#Basicsystemaliases--theseMUSTbepresent. 

MAILER-DAEMON:postmaster 

postmaster:root 

#Generalredirectionsforpseudoaccounts. 

bin:root 

daemon:root 

#games:root?removeorcommentout. 

#ingres:root?removeorcommentout. 

nobody:root 

#system:root?removeorcommentout. 

#toor:root?removeorcommentout. 

#uucp:root?removeorcommentout. 

#Well-knownaliases. 

#manager:root?removeorcommentout. 

#dumper:root?removeorcommentout. 

#operator:root?removeorcommentout. 

#trapdecodetocatchsecurityattacks 

#decode:root 

#Personwhoshouldgetrootsmail 

#root:marc

最后更新后不要忘记运行/usr/bin/newaliases,使改变生效。

Linux网络安全技巧之阻止你的系统响应任何从外部/内部来的ping请求。

既然没有人能ping通你的机器并收到响应,你可以大大增强你的站点的安全性。你可以加下面的一行命令到/etc/rc.d/rc.local,以使每次启动后自动运行。

echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all

Linux网络安全技巧之不要显示出操作系统和版本信息。

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

/etc/inetd.conf中的一行象下面这样:

telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd -h

加-h标志在最后使得telnet后台不要显示系统信息,而仅仅显示login:

Linux网络安全技巧之The /etc/host.conf file

编辑host.conf文件(vi /etc/host.conf)且加下面的行:

#LookupnamesviaDNSfirstthenfallbackto/etc/hosts. 

orderbind,hosts 

#WedonhavemachineswithmultipleIPaddressesonthesamecard 

(likevirtualserver,IPAliasing). 

multioff 

#CheckforIPaddressspoofing. 

nospoofon 

IPSpoofing:IP-Spoofingisasecurityexploitthatworksbytricking 

computersinatrustrelationshipthatyouaresomeonethatyoureallyaren.

Linux网络安全技巧之The /etc/securetty file

该文件指定了允许root登录的tty设备,/etc/securetty被/bin/login程序读取,它的格式是一行一个被允许的名字列表,如你可以编辑/etc/securetty且注释出下面的行。

tty1 

#tty2 

#tty3 

#tty4 

#tty5 

#tty6 

#tty7 

#tty8

-意味着root仅仅被允许在tty1终端登录。

Linux网络安全技巧还有很多,它们都可以有效的保护Linux网络的安全,我们会在以后的文章中为大家介绍,大家也结合以前的文章多多了解吧。

继续浏览有关 安全 的文章
发表评论