好用的 iptables rules – 限制 client 連 http port 的次數

限制 client 連 80 port 的次數 = 60 秒 2次 , 超過就 drop

iptables -I INPUT -p tcp –dport 80 -i eth0 -m state –state NEW -m recent –set
iptables -I INPUT -p tcp –dport 80 -i eth0 -m state –state NEW -m recent –update –seconds 60 –hitcount 2 -j DROP