Yu Oasa <[email protected]> said: >あと、rc.conf の中身はどうでしょうか
> grep ^ipf /etc/rc.conf 特に記述してありませんでしたが、試しに ipfilter_enable="YES" ipfilter_rules="/etc/ipf.rules" をつけたら起動しました。 >もし自信がなければ、スクリプト蹴ったほうが楽ですよ > /etc/rc.d/ipfilter (start|restart|reload) そして、手動でスクリプトを起動してみたらこうなりました。 # /etc/rc.d/ipfilter start Cannot 'start' ipfilter. Set ipfilter_enable to YES in /etc/rc.conf or use 'onestart' instead of 'start'. (あえてコメントアウトしてあります) そして、コメントをはずしてから # /etc/rc.d/ipfilter start Enabling ipfilter. 31:ioctl(add/insert rule): No such process 34:ioctl(add/insert rule): No such process 37:ioctl(add/insert rule): No such process 38:ioctl(add/insert rule): No such process 41:ioctl(add/insert rule): No such process 1:ioctl(add/insert rule): No such process # ipfstat -io empty list for ipfilter(out) block in quick proto tcp/udp from any to 固定IP/32 port = auth block in quick proto tcp/udp from any to 固定IP/32 port = netbios-ns block in quick proto tcp/udp from any to 固定IP/32 port = netbios-dgm block in quick proto tcp/udp from any to 固定IP/32 port = netbios-ssn block in quick proto tcp/udp from any to 固定IP/32 port = microsoft-ds block in quick proto tcp/udp from any to 固定IP/32 port = wins block in quick proto tcp/udp from any to 固定IP/32 port = 3389 のようになりました。 その後、ipf.rulesをいじって # localnet block #block in log quick on ng0 from 192.168.1.0/24 to any group 200 # multicast block #block in log quick on ng0 from 224.0.0.0/4 to any group 200 # smtp allow #pass in quick on ng0 proto tcp from any to any port = 25 flags S/SA keep state group 200 # pop3 allow #pass in quick on ng0 proto tcp from any to any port = 110 flags S/SA group 200 # www allow #pass in quick on ng0 proto tcp from any to any port = 80 flags S/SA group 200 # ssl allow #pass in quick on ng0 proto tcp from any to any port = 443 flags S/SA group 200 # dns allow #pass in quick on ng0 proto tcp from any to any port = 53 flags S/SA group 200 #pass in quick on ng0 proto udp from any to any port = 53 group 200 # localnet allows #pass out on em0 from 192.168.1.0/24 to 192.168.1.0/24 group 350 のようにしてから # /etc/rc.d/ipfilter reload Reloading ipfilter rules. Set 1 now inactive # ipfstat -io empty list for ipfilter(out) block in quick proto tcp/udp from any to 219.117.205.36/32 port = auth block in quick proto tcp/udp from any to 219.117.205.36/32 port = netbios-ns block in quick proto tcp/udp from any to 219.117.205.36/32 port = netbios-dgm block in quick proto tcp/udp from any to 219.117.205.36/32 port = netbios-ssn block in quick proto tcp/udp from any to 219.117.205.36/32 port = microsoft-ds block in quick proto tcp/udp from any to 219.117.205.36/32 port = wins block in quick proto tcp/udp from any to 219.117.205.36/32 port = 3389 のようになりました。 そして、シマンテックのセキュリティーチェックで以下のようになりました。 http://security.symantec.com/sscv6/home.asp?langid=jp 要注意 対ハッカー露出度チェック 安全 Windows 脆弱性チェック 安全 トロイの木馬チェック なお、上記×の詳細は以下のとおりです。 ICMP Ping Ping: open (いつも応答チェック用に空けてあります) 21 FTP (File Transfer Protocol): open (開けてあります) 22 SSH: closed (使っていません) 23 Telnet: open (ucspi-tcpで別IPアドレスでslが走ります) 25 SMTP (Simple Mail Transfer Protocol): open 79 Finger: closed 80 HTTP (Hypertext Transfer Protocol): open (使っています) 110 POP3 (Post Office Protocol): closed (localnetのみの使用) 113 Ident / Authentication.: stealth 119 NNTP (Network News Transfer Protocol): closed 135 Location service (loc-srv): closed 139 NetBIOS: stealth 143 IMAP (Internet Message Access Protocol): closed 443 TLS/SSL 経由の HTTP: closed (いずれ開けます) 445 Windows NT / 2000 SMB: stealth 1080 SOCKS: closed 1723 PPTP (Point-to-Point Tunneling Protocol): closed 5000 UPnP (ユニバーサルプラグアンドプレイ): closed 5631 pcAnywhere: closed 参考: open: 開いたポートはポート探査に応答し、ポートが利用できてしまいます。 開いたポートは簡単にハッカーの入り口となるので危険です。 close: 閉じたポートは見えますが、攻撃によって開くことができません。 状態としては安全ですが、ハッカーはコンピュータの存在を検出するために 閉じたポートを使うことができ、潜在的な攻撃の対象となります。 stealth: ステルスポートは最も安全なポートの状態です。 「ステルス」という状態はポート探査に対しても全く応答せず、 潜在的な攻撃対象をハッカーが探しているときに、 仮想的に全く見えなくなります。最も安全な状態ですが、 ステルスポートは一部のインターネットアプリケーションで パフォーマンスの問題の原因となることがあります。 なな <[email protected]>
