This page was last modified: May 18 2008 11:46:26   
Too Cool for Internet Explorer

Surf in privacy with Tor/Privoxy and Firefox

Privacy and censorship on the Internet are discussed all over the world these days. I am not going to bore you with my personal opinion on these subjects, but I'll tell you how to use TOR and Privoxy together with Firefox.

About TOR (quote from Tor: anonymity online):

Tor is a software project that helps you defend against traffic analysis, a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security.
Tor protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world: it prevents somebody watching your Internet connection from learning what sites you visit, and it prevents the sites you visit from learning your physical location.

About Privoxy (quote from Privoxy):

Privoxy is a non-caching web proxy with advanced filtering capabilities for enhancing privacy, modifying web page data, managing HTTP cookies, controlling access, and removing ads, banners, pop-ups and other obnoxious Internet junk.
Privoxy has a flexible configuration and can be customized to suit individual needs and tastes. Privoxy has application for both stand-alone systems and multi-user networks.

In this setup, Privoxy (among other things) is the glue between Firefox and Tor.

Install TOR and Privoxy

Go to Applications -> Add/Remove Software and search for 'privoxy' (without the quotes). Both Privoxy and Tor should come up in the result. Install both of them.

Configure Privoxy

Tor is fine as is... most people do not need to configure anything.

Privoxy, on the other hand, needs a bit of tweaking.:

Start a terminal window and become root, then go to the place of the configuration file and backup the standard config:

$ su
Password:
# cd /etc/privoxy/
# cp config config.old
# :>config

Now you have a backup of the standard configuration (config.old) and an empty file (config) which you will now open and insert these lines:

# Generally, this file goes in /etc/privoxy/config
#
# Tor listens as a SOCKS4a proxy here:
forward-socks4a / 127.0.0.1:9050 .
confdir /etc/privoxy
logdir /var/log/privoxy
actionsfile standard # Internal purpose, recommended
actionsfile default # Main actions file
actionsfile user # User customizations
filterfile default.filter

# Don't log interesting things, only startup messages, warnings and errors
#logfile logfile
#jarfile jarfile
#debug 0 # show each GET/POST/CONNECT request
debug 4096 # Startup banner and warnings
debug 8192 # Errors - *we highly recommended enabling this*

user-manual /usr/share/doc/privoxy/user-manual
listen-address 127.0.0.1:8118
toggle 1
enable-remote-toggle 1
enable-edit-actions 1
enable-remote-http-toggle 0
buffer-limit 4096

Check all the paths in the above configuration and make sure they match your system. If not, correct them.

Fire it up!

Start Privoxy:

/etc/init.d/privoxy start
/etc/init.d/tor start

If you make any changes to the configuration run these commands again with 'restart' instead of 'start'.

There is a Tor addon for Firefox... go to Torbutton and install it.

After Firefox is restarted, you should see the text "Tor Disabled" in the bottom right corner of Firefox. Just left-click the text to enable Tor.

See it work

You'll notice that surfing with Tor enabled is slower.

Make sure Tor is disabled in Firefox and then go to ipaddresslocation.org. You'll see your IP address, your country... maybe even the city you live in, or at least one that is close by.

Enable Tor and load that same page. You'll now see completely different information. For example, I am now a citizen of Gunzenhausen, Germany ;-)