Created
July 11, 2014 20:15
-
-
Save josuecau/44c3d4485bac5ea83d35 to your computer and use it in GitHub Desktop.
Ban & unban IP
This file contains 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
#!/bin/sh | |
if [ $# -eq 0 ] | |
then | |
echo "Usage: $(basename $0) IP.TO.BAN" | |
exit 1 | |
fi | |
iptables -I INPUT -s $1 -j DROP |
This file contains 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
#!/bin/sh | |
if [ $# -eq 0 ] | |
then | |
echo "Usage: $(basename $0) IP.TO.UNBAN" | |
exit 1 | |
fi | |
iptables -D INPUT -s $1 -j DROP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment