Saturday, September 19, 2009

HOWTO : The Onion Router (Tor) on Ubuntu 9.04

The Onion Router (Tor) allows you to surf the internet anonymously. The connection between relays and bridges are encrypted. However, you and the bridges or relays are not. The disadvantage of using Tor is the connection speed will drop a lot. You will feeling that you are using a 56K modem in the modern days.

Step 0 :

Add Tor repositories.
sudo nano /etc/apt/sources.list.d/tor.list

Copy and paste the following lines to the file.

deb jaunty main
deb-src jaunty main

Step 1 :

Get and install the Tor GPG key.

gpg --keyserver --recv 94C09C7F
gpg --fingerprint 94C09C7F
gpg --export 94C09C7F | sudo apt-key add -
sudo apt-get update
sudo apt-get upgrade

Install tor.
sudo apt-get install tor

Step 2 :

Install Privoxy.
sudo apt-get install privoxy

Edit the configure file of privoxy.
sudo nano /etc/privoxy/config

Uncomment the following line.

forward-socks4a / localhost:9050 .

Step 2a (Optional) :

If you are behind firewall or NAT as well as router, you should uncomment the following line at the configure file.

forward 192.168.*.*/ .

Step 3 :

Made sure Tor is working.

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

netstat -a | grep 9050

If the output is similar to the following line, your Tor is working.

tcp 0 0 localhost:9050 *:* LISTEN

You can confirm the Tor is working on the remote side by visiting the following site.

Step 4 :

Install Vidalia which is a Graphical User Interface for Tor.
sudo apt-get install vidalia

Step 5 :

Get TorButton for Firefox.


Reference :
Tor Official site
Tor on Ubuntu

That's all. See you!