Linux網(wǎng)絡(luò)安全技巧(2)
Linux網(wǎng)絡(luò)安全技巧之別名文件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 roots mail
- #root: marc
最后更新后不要忘記運行/usr/bin/newaliases,使改變生效。
Linux網(wǎng)絡(luò)安全技巧之阻止你的系統(tǒng)響應(yīng)任何從外部/內(nèi)部來的ping請求。
既然沒有人能ping通你的機(jī)器并收到響應(yīng),你可以大大增強(qiáng)你的站點的安全性。你可以加下面的一行命令到/etc/rc.d/rc.local,以使每次啟動后自動運行。
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
Linux網(wǎng)絡(luò)安全技巧之不要顯示出操作系統(tǒng)和版本信息。
如果你希望某個人遠(yuǎn)程登錄到你的服務(wù)器時不要顯示操作系統(tǒng)和版本信息,你能改變
/etc/inetd.conf中的一行象下面這樣:
telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd -h
加-h標(biāo)志在最后使得telnet后臺不要顯示系統(tǒng)信息,而僅僅顯示login:
Linux網(wǎng)絡(luò)安全技巧之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 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 .
Linux網(wǎng)絡(luò)安全技巧之The /etc/securetty file
該文件指定了允許root登錄的tty設(shè)備,/etc/securetty被/bin/login程序讀取,它的格式是一行一個被允許的名字列表,如你可以編輯/etc/securetty且注釋出下面的行。
- tty1
- #tty2
- #tty3
- #tty4
- #tty5
- #tty6
- #tty7
- #tty8
-意味著root僅僅被允許在tty1終端登錄。
Linux網(wǎng)絡(luò)安全技巧還有很多,它們都可以有效的保護(hù)Linux網(wǎng)絡(luò)的安全,我們會在以后的文章中為大家介紹,大家也結(jié)合以前的文章多多了解吧。
【編輯推薦】
- Linux網(wǎng)絡(luò)安全技巧(1)
- 如何加強(qiáng)企業(yè)Linux系統(tǒng)安全
- 從堵住系統(tǒng)漏洞開始 保護(hù)Linux系統(tǒng)安全
- 從堵住系統(tǒng)漏洞開始 保護(hù)Linux系統(tǒng)安全 續(xù)