Skip to content

Instantly share code, notes, and snippets.

Created January 3, 2016 23:38
Show Gist options
  • Save anonymous/78100f7fad93f58f325b to your computer and use it in GitHub Desktop.
Save anonymous/78100f7fad93f58f325b to your computer and use it in GitHub Desktop.
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j SSHSCAN
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A SSHSCAN -m recent --set --name SSH --rsource
-A SSHSCAN -m recent --update --seconds 3600 --hitcount 20 --name SSH --rsource -j LOG --log-prefix "Dropped SSH connection: " --log-level 6
-A SSHSCAN -m recent --update --seconds 3600 --hitcount 20 --name SSH --rsource -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment