Skip to content

Instantly share code, notes, and snippets.

@maxp
Created June 5, 2012 00:09
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save maxp/2871622 to your computer and use it in GitHub Desktop.
Save maxp/2871622 to your computer and use it in GitHub Desktop.
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
# see also:
# tor.dnsbl.sectoor.de, dnsbl.proxybl.org, rbl.efnet.org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment