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
#!/usr/bin/env bash | |
# List variables | |
blocklist_name="Spamhaus" # MUST BE UNIQUE IN IPTABLES | |
blocklist="http://www.spamhaus.org/drop/drop.lasso" | |
# No more variables. Edit below here at your own risk. | |
PATH="/sbin:$PATH" | |
printf "Retrieving block list: %s... " "$blocklist" | |
list=`curl -sSL "$blocklist" | cut -d ";" -f 1 | grep -v "^$"` |