IPtables reject repeated requests

You can leverage iptables to reject repeated requests that may be seen as DDOS or rogue players.

iptables -A INPUT -p tcp –dport [port] -i [eth] -m state –state NEW -m recent –set
iptables -A INPUT -p tcp –dport [port] -i [eth] -m state –state NEW -m recent –update –seconds [seconds] –hitcount [total] -j DROP

[port] = port number ex. 1935
[seconds] = total seconds window between requests
[total] = total connections
[eth] = ethernet adapter id


Comments are closed.