File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1414IPTABLES=" /sbin/iptables"
1515
1616# list of known spammers
17- URLS=" https://www.spamhaus.org/drop/drop.lasso https://www.spamhaus.org/drop/edrop.lasso "
17+ URLS=" https://www.spamhaus.org/drop/drop.txt https://www.spamhaus.org/drop/edrop.txt "
1818
1919# local cache copy
20- CACHE_FILE=" /tmp/drop.lasso "
20+ CACHE_FILE=" /tmp/drop.txt "
2121
2222# iptables custom chain name
2323CHAIN=" Spamhaus"
@@ -130,8 +130,8 @@ update_iptables() {
130130 fi ;
131131
132132 # iterate through all known spamming hosts
133- LASSOIP =" $( cut -d ' ' -f1 " $CACHE_FILE " | tr -d ' ;' | awk ' NF > 0' ) "
134- for IP in $LASSOIP ; do
133+ SPAMIP =" $( cut -d ' ' -f1 " $CACHE_FILE " | tr -d ' ;' | awk ' NF > 0' ) "
134+ for IP in $SPAMIP ; do
135135 if [ $LOG_BLOCKLIST_HITS -eq 1 ]; then
136136 # add the ip address log rule to the chain
137137 $IPTABLES -A " $CHAIN " -p 0 -s " $IP " -j LOG --log-prefix " [SPAMHAUS BLOCK]" -m limit --limit 3/min --limit-burst 10
You can’t perform that action at this time.
0 commit comments