Skip to content

Instantly share code, notes, and snippets.

View slbug's full-sized avatar

Alexander Grebennik slbug

  • Poland
  • 09:47 (UTC +02:00)
View GitHub Profile
@slbug
slbug / block-tor.sh
Created May 6, 2019 20:41 — forked from maxp/block-tor.sh
iptables Tor filter
ipset -N tor iphash
wget -q https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=$MY_IP -O - | sed '/^#/d' |while read IP
do
ipset -q -A tor $IP
done
iptables -A INPUT -m set --match-set tor src -j DROP