From 3e43ccb2104f3f6172f8e1b0db068c6ba32ddc10 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 22 Jun 2021 08:27:46 +0200 Subject: [PATCH] bash shell script to block tor exit nodes --- tor-block.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tor-block.sh diff --git a/tor-block.sh b/tor-block.sh new file mode 100644 index 0000000..36f99f2 --- /dev/null +++ b/tor-block.sh @@ -0,0 +1,4 @@ +#!/bin/bash +url="https://check.torproject.org/torbulkexitlist" +wget -q "$url" -O /tmp/.tor.lst +while read -r ipTor; do echo "$ipTor"; iptables -A INPUT -s $ipTor -j DROP; done < /tmp/.tor.lst