Triplex Systems★開発メモ - iptablesの設定例
*filter
:INPUT DROP [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]

-A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT
-A INPUT -m state --state NEW -p tcp --dport 22222 \
-m hashlimit --hashlimit-burst 5 --hashlimit 1/m --hashlimit-mode srcip \
--hashlimit-htable-expire 120000 --hashlimit-name ssh-limit -j ACCEPT

-A INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT

-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

-A INPUT -p icmp -j ACCEPT

-A INPUT -i lo -j ACCEPT

-A INPUT -j LOG --log-prefix "iptables:" --log-level=error

COMMIT