Skip to content

Commit e7d5e7f

Browse files
authored
update spamhaus urls (#2621)
fix #2616 Signed-off-by: Daniel Hansson <[email protected]>
1 parent 920f638 commit e7d5e7f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

static/spamhaus-drop.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
IPTABLES="/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
2323
CHAIN="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

0 commit comments

Comments
 (0)