Jul 10, 2017

How to rate limit a port on Linux firewall

# Enable port 22 (ssh) but rate limit it:
-A INPUT -p tcp -m tcp --dport 22 ! --syn -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 --syn -m limit --limit 3/minute -j ACCEPT