![]() クラウドで 伸びる人沈む人 |
|
|
|
|
|
|
|
|
iptablesでpingを遮断する
<IT技術の処方箋:iptablesでpingを遮断する> iptablesを使うと、パケットフィルタができます。 ここでは、ping遮断の簡単な例をみましょう。 ●以下のコマンドで、iptablesの設定一覧を表示します。 # iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination ※何も設定していないと、上記のようになります。 ●以下のコマンドで、192.168.0.10からのping(icmp)接続を拒否します。 # iptables -A INPUT -p icmp -s 192.168.0.10 -j DROP ※ オプションは以下のとおりです。 -A:設定追加 -p:プロトコル名 -s:IPアドレス -j:ジャッジ(判断) ●以下のコマンドで、上記のiptablesの設定解除 #iptables -F ※iptablesの接続拒否は慎重にお願いします。 ※pingについての参照 http://www.searchman.info/tips/2000.html
慣れてきましたか?慣れてきたら、
Linux自宅サーバーの注意点チェック |