Skip to content

Instantly share code, notes, and snippets.

@bigeagle
Last active December 10, 2015 02:05
Show Gist options
  • Save bigeagle/539b69f7e4fd7918a863 to your computer and use it in GitHub Desktop.
Save bigeagle/539b69f7e4fd7918a863 to your computer and use it in GitHub Desktop.
sshban
iptables -N sshban
iptables -A sshban -p tcp -m tcp --dport 22 -m state --state NEW -m recent --set --name DEFAULT --rsource
iptables -A sshban -p tcp -m tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 4 --name DEFAULT --rsource -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment