These are just the steps to install tor and the necessary software to make it run smoothly on your Ubuntu. For detailed info on what each parts does, you can always refer to the tor docs.
1. Add the following to the end of your /etc/apt/sources.list file.
The format here is
deb http://deb.torproject.org/torproject.org <distribution> mainSince we are using Ubuntu 12.04 we will use 'precise' for the distribution
deb http://deb.torproject.org/torproject.org precise main2. Import torproject.org repository GPG key
gpg --keyserver keys.gnupg.net --recv 886DDD89To keep the repository key up-to-date, install the debian package
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
sudo apt-get update
apt-get install deb.torproject.org-keyring3. Install tor, tor-geoipdb, polipo, privoxy
sudo apt-get install tor tor-geoipdb polipo privoxy4. To Configure polio, first backup the original.
sudo mv -i /etc/polipo/config /etc/polipo/config.orig5. Add the following to the file or find those lines and uncomment them.
sudo vim /etc/polipo/config
socksParentProxy = "localhost:9050"6. (Optional but recommended) If you want a GUI frontend for tor install vidalia
socksProxyType = socks5
diskCacheRoot = ""
disableLocalInterface = true
sudo apt-get install vidaliaVidalia will show a message on how it should handle tor. You can choose 'complete takeover'.
7. Append the following at the end of /etc/privoxy/config file or uncomment the line
sudo vim /etc/privoxy/configNote that there is a space and a dot after 9050
forward-socks5 / 127.0.0.1:9050 .
8. Now we have successfully installed and configured the tor and its family, we need to tell the browser to use the network.
Assuming that tor is running else, start tor by
sudo /etc/init.d/tor startOpen firefox, and install tor addon.
If you install the tor button addon, then choose use polipo in the browser network settings.
Else to configure manually goto preference->advanced->network->settings->manual proxy configuration and enter the values for the following
HTTP Proxy: 127.0.0.1 Port: 8118And click test settings. If things went well you'll get 'Tor proxy test successful' message.
SSL Proxy : 127.0.0.1 Port: 8118
SOCKS Host: 127.0.0.1 Port: 9050
Choose SOCKSv5
No Proxies for: 127.0.0.1
You can check you IP address to see the difference.
9. Take
about:config
in the Firefox browser and set the value for network.proxy.socks_remote_dns
to true
to avoid DNS leaks.NB: Its better not to run P2P software in tor network. The main purpose of tor is to provide anonymity for browsing. To make the tor network faster, you can consider running a tor relay on your system as well.
I highly recommend using the HTTPS Everywhere extension for firefox from eff.org. It will make your browser to choose https protocol over http if the target server supports one.