Welcome to my guide on installing Tor to enable you to surf the net anonymously.
Coming from an Ubuntu background i wasn't sure how different it would be to install on a Debian system. Turns out this installation is very similar to the one I used for Ubuntu so I have to give that credit here: https://help.ubuntu.com/community/Tor Also some official pages from Tor about Debian installations here http://www.torproject.org/docs/debian.html.en
I'm not claiming to be an expert at networking stuff or claiming this is the best guide. It's simply what I did incase anyone else wants to try it >
[ Install Tor ]
To install Tor run the following commands;
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install tor tor-geoipdb
NOTE: Tor installs polipo by default with the default configuration as listed on http://www.torproject.org/docs/debian.html.en
I can’t see any reason to edit the polipo configuration file if you decide to though, it lives in /etc/polipo/config.
[ Installing Privoxy ]
On the Tor website there is information that you should not run polipo and privoxy at the same time as they both listen on port 8118. The Tor-Button doesn't seem to work without Privoxy though so we need to install privoxy also.
sudo apt-get install privoxy.
Open /etc/privoxy/config and add the following line of configuration, anywhere should be fine but I just added it as a new last line. The "9050 ." isn't a typo.
forward-socks4a / 127.0.0.1:9050 .
Personally I had a look at the privoxy configuration file itself and it seemed fairly conclusive but you can use the Tor website version if you want I guess: http://www.torproject.org/docs/tor-doc-
en#polipo.
[ But what about the problem of not running Polipo and Privoxy together? ]
Good question! When installed; tor, polipo and privoxy all start at boot. This not only chews up RAM but may cause errors as mentioned above.
To remove this problem I disabled the 3 programs from running at boot, using these commands :
sudo update-rc.d -f tor remove
sudo update-rc.d -f polipo remove
sudo update-rc.d -f privoxy remove
Basically update-rc.d manages all of the symlinks in the various runlevels to the original init script in question. In Debian systems runlevels 2-5 are identical but I think they're just left there to allow the more traditional system to be restored if required or possibly for compliance.
[ Starting Tor, Privoxy and Check the service is running on port 9050 ]
sudo /etc/init.d/tor start
sudo /etc/init.d/privoxy start
Now check that the service is running on port 9050 by running the following
sudo netstat -a | grep 9050
You should see this after a slight pause:
tcp 0 0 localhost:9050 *:* LISTEN
[ Configuring Exit Nodes ]
To configure the exit nodes you will want to edit the torrc file found in /etc/tor/torrc. Check the website https://torstat.xenobite.eu/index.php?S
mp;SO=Desc to get a good idea of the fastest servers to connect with.
These can then be configured as your exit notes by simply adding the line "exitnodes *" at the bottom of torrc, for example:
exitnodes amunet1, amunet2, amunet3, amunet4
[ Torbutton In Firefox ]
https://addons.mozilla.org/en-US/firefox/addon/2275/
Use this to quickly automate the service on and off in Firefox. As well as testing you are connected to Tor via https://check.torproject.org/ you should also look to http://www.ip2location.com/ to see which particular country and server you are running under. This is a good way to confirm you have configured the exit nodes correctly.
[ Disable the services without rebooting ]
You can disable the services by running the following relevant commands:
sudo /etc/init.d/tor stop
sudo /etc/init.d/privoxy stop
sudo /etc/init.d/polipo stop
[ Summary ]
Tor should be fully installed and working for you now. Be very careful not to mistake Tor as a security device, it is strictly anonymity. IMO you should never use Tor for anything like banking or emails, forums etc - basically anything where the password details you give could be recorded in the Tor network. For more info have a look at these couple of links http://www.torproject.org/overview.html.en and http://www.torproject.org/download.html.en#Warning
Hope this guide works out for you. I shall try and help as best I can if you have any problems but as I said I am not exactly an expert! Have fun 