* 共用サーバで行うべきセキュリティー設定 [#w723a06d] ** SSHのログイン試行回数 [#ra8881c7] SSHを鍵認証に出来ないといった場合には,MaxAuthTries を設定すべき。~ debian sarge では,現在出来ないが,testing では可能。 http://www.unixuser.org/~euske/doc/openssh/jman/sshd_config.html 鍵認証にするには,Solaris10では,以下のように設定をする必要がある PAMAuthenticationViaKBDInt no http://www14.plala.or.jp/campus-note/vine_linux/server_ssh/sshd_config.html ** ファイルパーミッション [#je7abdcd] *** 共通(Linux/BSD) [#dfd1a075] /sbin を o-rx にするかは、悩ましいところ chmod o-rx /var/log chmod o-rx /etc/sysctl.conf chmod o-rx /etc/syslog.conf chmod o-rx /etc/fstab chmod o-rx /etc/ssh/ chmod o-rx /bin/netstat chmod o-rx /bin/dmesg chmod o-rx /sbin/ifconfig *** Linux [#i9bdd339] chmod o-rx /etc/snmp/snmpd.conf chmod o-rx /etc/network chmod o-rx /etc/sysconfig/ *** BSD [#rdb73d04] chmod o-rx /usr/local/etc/snmpd.conf chmod o-rx /etc/rc.conf chmod o-rx /var/log chmod o-rwx /etc/ipf* BSD上で動かすAP群 chmod o-r /usr/local/etc/snmpd.conf chmod 751 /usr/local/etc/postfix chown -R root:postfix /usr/local/etc/postfix chmod o-rxw /usr/local/etc/postfix/* chmod o+r /usr/local/etc/postfix/main.cf chgrp dovecot /usr/local/etc/dovecot* chmod o-rwx /usr/local/etc/dovecot* chown root:www /usr/local/etc/apache22 ; chmod 750 /usr/local/etc/apache2 chgrp www /home/www chmod 711 /home/www chown nobody /usr/local/etc/ftppasswd chmod go-rx /usr/local/etc/ftppasswd ** FreeBSDでのサンプル [#qd9e0983] 参考 /etc -rw------- 1 root wheel 0 Oct 26 2004 .lock.userdb -rw-r----- 1 root wheel 768 Dec 5 19:37 crontab -rw-r----- 1 root wheel 737 Oct 19 2004 crontab.20051205 -rw-r----- 1 root wheel 391 Oct 19 2004 fstab -rw-r----- 1 root wheel 5230 Oct 19 2004 inetd.conf drwx------ 2 root wheel 512 Oct 14 2004 isdn -rw------- 1 root wheel 10663 Jan 29 02:53 master.passwd -rw-r----- 1 root wheel 2195 Oct 17 16:19 newsyslog.conf -rw------- 1 root wheel 1603 Sep 21 2004 nsmb.conf -rw------- 1 root wheel 436 Sep 21 2004 opieaccess -rw------- 1 root wheel 838 Mar 20 2005 rc.conf -rw-r----- 1 root wheel 2362 Oct 27 19:26 rc.ipfw -rw------- 1 root wheel 0 Oct 14 2004 skeykeys -rw------- 1 root wheel 90112 Jan 29 02:53 spwd.db -rw-r----- 1 root wheel 154 Jan 13 2005 sysctl.conf -rw-r----- 1 root wheel 1627 Oct 20 11:00 syslog.conf -rw------- 1 root wheel 1272471 Jan 27 22:02 userdb -rw------- 1 root wheel 1343488 Jan 27 22:02 userdb.dat -rw------- 1 root wheel 1327104 Jan 27 22:02 userdbshadow.dat drwxrwx--- 2 uucp uucp 512 Oct 14 2004 uucp drwxr-x--- 7 root www 512 12 4 15:59 /usr/local/etc/apache22 drwx------ 7 root www 512 11 6 2008 /usr/local/etc/apache22.20081106 drwxr-x--- 4 root postfix 1024 11 10 12:44 /usr/local/etc/postfix -r-------- 1 nobody wheel 354 5 30 2009 /usr/local/etc/ftppasswd drwx--x--x 21 root www 1024 12 4 15:35 /home/www