From 5b6308f29be77e06781ea854ef6bde8f289aa8af Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Tue, 19 Dec 2023 14:00:49 -0500 Subject: [PATCH] filter out IPv4 Tor exit nodes from SFS listed IPs This list doesn't include IPv6 addresses and SFS includes those as /64 blocks so filtering them out would be a bit more complex. --- stopforumspam-update | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stopforumspam-update b/stopforumspam-update index 22d7eb8..a00b8ee 100755 --- a/stopforumspam-update +++ b/stopforumspam-update @@ -20,7 +20,9 @@ if [[ $mode == hourly ]]; then curl --fail-with-body https://www.stopforumspam.com/downloads/listed_ip_1.zip | gunzip | awk '{ print $1 " 1;" }' > stopforumspam-listed_ip_1_ipv46.conf.new mv stopforumspam-listed_ip_1_ipv46.conf.new stopforumspam-listed_ip_1_ipv46.conf - cat stopforumspam-listed_ip_30_ipv46.conf stopforumspam-listed_ip_1_ipv46.conf | sort -u > stopforumspam-listed_ip_merged_ipv46.conf + curl --fail-with-body https://check.torproject.org/torbulkexitlist | sort -u > torbulkexitlist.txt + + cat stopforumspam-listed_ip_30_ipv46.conf stopforumspam-listed_ip_1_ipv46.conf | sort -u | comm -1 -3 torbulkexitlist.txt - > stopforumspam-listed_ip_merged_ipv46.conf nginx -s reload fi