・余計なサービスを停止 http://kajuhome.com/server_access.shtml を参考にしました サービスの状況を確認 $/sbin/chkconfig --list sendmailを停止 $/etc/rc.d/init.d/sendmail stop $/sbin/chkconfig sendmail off ポートの状況を確認 $yum -y install nmap $nmap localhost #$/usr/sbin/setup #を使う方法もある #enter→OK #space→選択 #tab→カーソルを動かす #f12→前に戻る ・rootになれるユーザーを制限 http://www.atmarkit.co.jp/flinux/rensai/security01/security01c.html を参考にしました. $vi /etc/login.defs 最終行に以下を追加 SU_WHEEL_ONLY yes $vi /etc/group wheelグループにrootになれるユーザーのみが記載されているか確認 $vi /etc/pam.d/su auth required /lib/security/pam_wheel.so use_uid を追加 ・rootアカウントでのリモートログインの不許可 $vi /etc/ssh/sshd_config PermitRootLogin yes →PermitRootLogin no $/etc/rc.d/init.d/sshd reload $ssh localhost -l root でチェックしてみる ・特定のホスト以外からのログインを禁止 $vi /etc/hosts.allow sshd:127.0.0.1,133.23.42.,133.23.55. クラスターのみ in.rshd:127.0.0.1,192.168.40.,192.168.20. を追加 $vi /etc/hosts.deny ALL:ALL $/etc/init.d/sshd restart