Last active
May 14, 2018 23:19
-
-
Save vpnwall-services/9486ea7788491b66784a57559f6fe225 to your computer and use it in GitHub Desktop.
[Block bad IP] Block abusing IP within Iptables #linux #shell #iptables #block
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/bash | |
#apt-get install dsniff cutter | |
echo -e "\nEnter IP you want to block :" | |
VAR=$1 | |
if [ -z $VAR ] | |
then | |
clear | |
echo -e "\Please input IP and try again ..." | |
else | |
echo -e "\nOkay, lets do this ..." | |
cutter $VAR | |
iptables -I -s $VAR -j DROP | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment