Skip to content

Commit

Permalink
filter Tor exit node from SFS listed IPs
Browse files Browse the repository at this point in the history
This currently only filters out the IPv4 addresses since we would need
another source for a list of IPv6 addresses along with a more involved
implementation to deal with Stop Forum Spam using /64 bans rather than
/128 bans.
  • Loading branch information
thestinger committed Dec 19, 2023
1 parent 1ddfb31 commit 3fdfc9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stopforumspam-update
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ if [[ $mode == hourly ]]; then
curl --fail-with-body https://www.stopforumspam.com/downloads/listed_ip_1.zip | gunzip > stopforumspam-listed_ip_1_ipv46.txt.new
mv stopforumspam-listed_ip_1_ipv46.txt.new stopforumspam-listed_ip_1_ipv46.txt

sort -u stopforumspam-listed_ip_30_ipv46.txt stopforumspam-listed_ip_1_ipv46.txt | awk '{ print $1 " 1;" }' > stopforumspam-listed_ip_merged_ipv46.conf
curl --fail-with-body https://check.torproject.org/torbulkexitlist | sort -u > torbulkexitlist.txt

sort -u stopforumspam-listed_ip_30_ipv46.txt stopforumspam-listed_ip_1_ipv46.txt | comm -1 -3 torbulkexitlist.txt - | awk '{ print $1 " 1;" }' > stopforumspam-listed_ip_merged_ipv46.conf

nginx -s reload
fi

0 comments on commit 3fdfc9a

Please sign in to comment.