Blocking Tor
Just a quick post about Tor (”The Onion Router“), which has been getting a lot of buzz as of late. I support the intent of the project, and the project overall, but there are a few shortcomings. One of these, in my mind, is that it’s too easy to block. Trackers aggregate all current exit nodes and offer up their IPs as a text file. Exit nodes, the last leaf of the onion, are the point of egress for all Tor traffic and so blocking those IPs will effectively block all of Tor.
Google around and you’ll find several TOR DNS black lists. I wrote a quick and dirty script to block Tor from a web site, utilizing Apache’s built-in htaccess mechanism. You can get it here if doesn’t show up correctly below.
#!/bin/bash
export HT=/path/to/webroot/.htaccess
export URL=http\:\/\/anonymizer\.blutmagie\.de\:2505\/ip_list_exit.php\/Tor_ip_list_EXIT\.csvwget ${URL} 2>/dev/null
# turn off dir listings; you can leave out if done globally
# you should ideally disable more than just this
echo “Options -Indexes” > ${HT}
# put your 403 error document in 403.html
echo “ErrorDocument 403 /403.html” >> ${HT}
echo “order allow,deny” >> ${HT}for ipaddr in `cat Tor_ip_list_EXIT.csv`; do
echo “deny from ${ipaddr}” >> ${HT}
doneecho “allow from all” >> ${HT}
rm Tor_ip_list_EXIT.csv
I would not suggest using it, as it does no sanity checks and relies on a site which I have no control over. However, it took only a few minutes and does block Tor effectively. It’s an illustration of how trivial Tor is to block. I set up a cron job to run it every 15 minutes and now the site gives 403s to Tor nodes (it’s not this site, so feel free to read this with Tor all you want.)
This is fine for those wanting to stop abusive Tor users, but what about when China and other such nations start adding Tor exit nodes to their country’s content filters? As soon as this happens, the main purpose behind Tor will become moot.
But I’m not sure how to fix this — more decentralization? Anyone have thoughts on this?
Posted: January 6, 2008 @ 4:00am under Security.
Comments: none