Skip to content

Instantly share code, notes, and snippets.

@joshterrill
Last active August 29, 2015 14:02
Show Gist options
  • Save joshterrill/b389e24db3fbcace7427 to your computer and use it in GitHub Desktop.
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
1.1.1.1
2.2.2.2
3.3.3.3
#!/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