對(duì)于linux我不是很精通,我只是個(gè)初學(xué)者,因?yàn)闀r(shí)間的原因,也沒有仔細(xì)的研究過.今天總結(jié)了一下加強(qiáng)redhat linux系統(tǒng)安全的一些小方法 高手請(qǐng)回避吧
1,禁止使用所有特殊帳號(hào):在lp,sync,shutdown,halt,news,games,gopher等用戶中,不使用默認(rèn)帳號(hào):[root@redhat/]#userdel LP 刪除組帳號(hào):[root@redhat/]#groupdel LP
2,啟動(dòng)shadow,并把系統(tǒng)中現(xiàn)有的密碼和組改為shadow密碼和組:用/usr/sbin/authconfig程序打開shadow 再分別使用pwconv和grpconv兩個(gè)命令
3,禁止普通用戶對(duì)控制臺(tái)的所有訪問:運(yùn)行 [root@redhat/]#rm–f/etc/security/console.apps/halt
[root@redhat/]#rm–f/etc/security/console.apps/poweroff
[root@redhat/]#rm–f/etc/security/console.apps/reboot
[root@redhat/]#rm–f/etc/security/console.apps/shutdown
當(dāng)然也可以刪除xserver文件,這樣除了root只外,沒有人可以啟動(dòng)xserver了
4,使系統(tǒng)不回應(yīng)ping:把echo 1>/proc/sys/net/ipv4/icmp_echo_ignore_all命令加到 /etc/rc.d/rc.local 文件中,使系統(tǒng)重啟的時(shí)候,自動(dòng)禁止回應(yīng)ping
5,顯示系統(tǒng)發(fā)行文件:在 /etc/inetd.conf 文件中的telnet選項(xiàng)改為:telnet stream tcp nowait root/usr/sbin/tcpd in.teknetd –h
6,不接受從不同控制臺(tái)的根用戶登陸:編輯 /ect/security 文件 在不需要的tty前面加# 禁用所選的設(shè)備
7,保護(hù) /ect/services文件:運(yùn)行 [root@redhat/]#chattr+i/ect/services
8,編輯 /ect/host.conf 文件:在 /ect/host.conf 文件中添加
#Lookup names via DNS first then fall back to /ect/hosts
Order bing,hosts
#We have machines with multiple IP address
multi on
#Check for IP address spoofing
nospoof on
9,隱藏系統(tǒng)的信息:首先在 /ect/rc.d/rc.local 文件中將#寫在這些行的前面