SHINYの気になる言葉
mindiaSHINYの気になる言葉記事

iptables 設定

!! (^ ..O ^ ) !! SHINYA · 2008-06-02

# iptables サービス停止(stop)
/etc/rc.d/init.d/iptables stop

#許可するport 拒否するportを設定

# tcp30000ポートを許可する例
iptables -A INPUT -p tcp --dport 30000 -j ACCEPT

# tcp135,137ポートを拒否する例
iptables -A INPUT -s ! $LOCALNET -p tcp -m multiport --dports 135,137 -j DROP

# save
/etc/rc.d/init.d/iptables save

# iptables service start
/etc/rc.d/init.d/iptables start

見出し語