Last active
August 29, 2015 14:02
-
-
Save joshterrill/b389e24db3fbcace7427 to your computer and use it in GitHub Desktop.
a small bash script that loops through all of the ip's in a file and blocks them using iptables
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
1.1.1.1 | |
2.2.2.2 | |
3.3.3.3 |
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
#!/bin/bash | |
for x in $(cat ip_list.txt) | |
do | |
iptables -A INPUT -s $x -j DROP | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment