歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> 加強redhat linux系統安全的方法

加強redhat linux系統安全的方法

日期:2017/2/27 14:20:51   编辑:更多Linux
  對於Linux我不是很精通,我只是個初學者,因為時間的原因,也沒有仔細的研究過.今天總結了一下加強redhat linux系統安全的一些小方法 高手請回避吧 1,禁止使用所有特殊帳號:在lp,sync,shutdown,halt,news,games,gopher等用戶中,不使用默認帳號:[root@redhat/]#userdel LP 刪除組帳號:[root@redhat/]#groupdel LP 2,啟動shadow,並把系統中現有的密碼和組改為shadow密碼和組:用/usr/sbin/authconfig程序打開shadow 再分別使用pwconv和grpconv兩個命令 3,禁止普通用戶對控制台的所有訪問:運行 [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 當然也可以刪除xserver文件,這樣除了root只外,沒有人可以啟動xserver了 4,使系統不回應ping:把echo 1>/proc/sys/net/ipv4/icmp_echo_ignore_all命令加到 /etc/rc.d/rc.local 文件中,使系統重啟的時候,自動禁止回應ping 5,顯示系統發行文件:在 /etc/inetd.conf 文件中的telnet選項改為:telnet stream tcp nowait root/usr/sbin/tcpd in.teknetd –h 6,不接受從不同控制台的根用戶登陸:編輯 /ect/security 文件 在不需要的tty前面加# 禁用所選的設備 7,保護 /ect/services文件:運行 [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,隱藏系統的信息:首先在 /ect/rc.d/rc.local 文件中將#寫在這些行的前面 # This will overwrite/ect/issue at every boot.So.make any changes you # want to make to/ect/issue here or you will lose them when you reboot #echo ””>/ect/issue #echo “$R”>>/ect/issue #echo “Kernel $(uname –r) on $a $(uname –m)” >>/ect/issue # #cp –f/ect/issue/ect/issue.net #echo >>/ect/issue 然後在 /ect目錄下刪除 issue和issue.net文件 [root@redhat/]#rm –f/ect/issue [root@redhat]#rm –f/ect/issue.net 10,刪除.bash_history文件:在 /ect/skel/.bash_logout 文件中添加 rm –f$HOME/.bash_history 使每次用戶退出的時自動刪除.bash_history文件 以上的很多命令的意思和使用這些命令的原因我都沒有解釋,主要是怕麻煩,抱歉了




Copyright © Linux教程網 All Rights Reserved