Created
February 25, 2014 16:19
-
-
Save rafaelfoster/9212175 to your computer and use it in GitHub Desktop.
Some iptables rules.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This rule, block one IP for 5 minutes, that is trying to connect to SSH port more than 3 times. | |
# ideal to block Brute Force Attacks | |
iptables -I INPUT -p tcp --dport 22 -m state --state NEW -m recent --set | |
iptables -I INPUT -p tcp --dport 22 -m state --state NEW -m recent --update --seconds 300 --hitcount 3 -j DROP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment