bash shell script to block tor exit nodes

This commit is contained in:
root 2021-06-22 08:27:46 +02:00
parent ac087a54ca
commit 3e43ccb210
1 changed files with 4 additions and 0 deletions

4
tor-block.sh Normal file
View File

@ -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