Created
March 30, 2018 19:44
-
-
Save rohan-molloy/f3d3993fbc13179a56600356abab488f to your computer and use it in GitHub Desktop.
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 | |
primary="badnets" | |
ipset create $primary hash:net &>/dev/null | |
if [[ -z "$sets" ]]; then | |
sets=( firehol_level3 firehol_level2 firehol_level1 firehol_webclient ); | |
fi | |
for s in "${sets[@]}"; do | |
wget -qO- "https://iplists.firehol.org/files/"$s".netset" | grep -v "^#" |\ | |
while read entry; do | |
ipset add $primary $entry &>/dev/null | |
done; | |
done; | |
/usr/sbin/ipset save $primary > /tmp/badnets.netset |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment