Setting up Tor on Ubuntu
Ξ November 4th, 2008 | → 11 Comments | ∇ Ubuntu |
There comes a time in everyone’s life when you “want to be alone”. Maybe you’re surfing t’internet at home and don’t want the man to track your every move. Maybe you’re stuck in China and don’t want to end up in the slammer. What ever the reason, being able to effectively access the web without leaving a trace is pretty useful. To this end tor is a superbly effective application. You can read about it’s principles and practices all over the place but in essence, when fired up, your first internet hop is an SSH tunnel into a cloud of thousands of anonymous onion servers. You are then bounced randomly through that until you emerge at the other end – with a new identity. Follow the instruction below to get it installed and try for yourself;
Open up a terminal window and install the tor package;
sudo apt-get install tor
Next step is if you are behind a firewall. For example, at work or univeristy or something. If you are at home with a direct internet connection, you can skip these steps and go to the privoxy bit. You will need to know the name and port of your corporate proxy server. If you don’t know this then, assuming your inflicted OS of “choice” is Windows something or other fire up internet explorer and have a look at the network options. There will either be a hardcoded proxy and port or a link to a configuration script. If it’s the latter copy and paste the address into your browser address box and choose to save the file locally. Open it in Wordpad and you will see the address and port number of your proxy towards the end of the file.
Armed with this information, you will need to point tor out through the corporate proxy. Iin your terminal type;
gksudo nautilus
Nautilus file manager will open in super-user mode. Now navigate to /etc/tor where you should find a torrc file. Open the file and add ;
HttpProxy my.proxy.server.com:portno
(replacing the values above with your own). I put this line after the first set of comments in the file. Save the file. Now close Nautilus.
Now we’re going to install privoxy. This isn’t strictly necessary, but it adds a wonderful layer of control to your anonymous session;
sudo apt-get install privoxy
The way that this is going to work, is that Firefox is going to use your privoxy session as a proxy server. The privoxy session will be routed out through your tor daemon. The tor daemon – as mentioned – is an SSH session to a random ball of string.
The install of Privoxy will ask you a few questions – one of them being whether you are using tor. Yes, to that and accept the defaults.
If you want to, you can edit the config file for Privoxy in /etc/privoxy – I do this to comment out the logging options. After all, there isn’t alot of point in being anonymous and then logging everything you do to your local machine.
Next, search for the line that contains forward-socks4a / 127.0.0.1:9050 and uncomment it.
Nearly there now. We just need to install a firefox extension. Point your browser to here ;
https://addons.mozilla.org/en-US/firefox/addon/2464
and install the foxyproxy plug-in. Once you have re-started firefox, you will see a status box in the bottom left of the bowser window. Left-click the box and a list of configured proxies will appear. Click “Add new proxy” and enter the following information ;
Under General;
Enabled: Tick
Proxy Name: Privoxy
Animate ….: Tick
Include …..: Tick
Under Proxy Details;
Manual Proxy …. : Tick
Host Name: 127.0.0.1 Port: 8118
SOCKS proxy? : UnTick
Under URL Patterns;
(If it doesn’t exist already)
Add new pattern;
Enabled: Tick
Pattern name: All
URL pattern: *
Whitelist: Tick
Wildcards: Tick
Then OK out of the dialogues.
Now we need to start the two daemons. From your terminal window;
sudo /etc/init.d/tor restart
sudo /etc/init.d/privoxy start
You’re now ready to give it a try:-
Open up firefox and go to the following address;
Note the IP address.
Right-click the FoxyProxy status box in your browser and select the Privoxy menu item.
Refresh the browser and note the entirely new IP address! Note: The onion network is a “cloud” of privately operated machines all over the world, all sharing their bandwidth freely. Sometimes it may run very slowly, sometimes it may run quickly. Live with it. As it is, your tor daemon will swap routers every ten minutes anyway – so you won’t have to live with it for ever.
If you’re at work and want further proof. Try activating privoxy and browsing to a file-sharing or torrent site – most will be blocked, but you’ll find that you can access any site quite happily.
Caveat time: You now have the ability to browse any web-site you want. Please don’t be a dick and do anything illegal. Don’t abuse the ability and don’t think that you’re some kind of 3li7e hAxor

No related posts.





on November 28th, 2008 at 10:20 am
гляди! Я ржал – http://ibigdan.livejournal.com/4243319.html – тема дня
)
Фото на тему кризиса..
да, и спасибо за пост) добавил в избранное
on November 29th, 2008 at 11:29 am
Nice post u have here
Added to my RSS reader
on December 16th, 2008 at 3:19 am
Thanks for this – but you left a big piece out. Your instruction will only result in using Tor, not Privoxy. In order to use Privoxy AND Tor, you must go into the Privoxy config file and uncomment the following line: forward-socks4a / 127.0.0.1:9050 .
Then in Foxy Proxy, you do NOT put 127.0.0.1 and port 9050 – as this goes directly to Tor, NOT to Privoxy.
The correct config would be 127.0.0.1, port 8118 (privoxy) and do NOT tick the Socks box.
If you do this, you will correctly browse through privoxy chained to Tor.
Cheers,
Charley
on December 16th, 2008 at 1:28 pm
You’re totally right – well spotted. I’ve updated the guide. Thanks!
on January 2nd, 2009 at 5:44 pm
[...] me to access the world outside. VPN hasn’t been working for long. Again. Thanks to a great guide I don’t have to rely on it any longer. Possibly related posts: (automatically [...]
on January 5th, 2009 at 10:15 am
It’s my pleasure. Enjoy your access to what should rightfully be yours.
on February 16th, 2009 at 8:24 pm
Excellent! Thanks alot mate!
on February 21st, 2009 at 6:55 pm
No worries bud.
on April 3rd, 2009 at 2:47 pm
Очень приятно видеть таких умный людей, красиво пишите посты, очень полезно и разнообразно. Буду вашей постоянной читательницей. Еще раз спасибо.
on April 10th, 2009 at 2:16 pm
FANTASTIC!
on April 23rd, 2009 at 11:14 am
С этой статьи начинаю читать Ваш блог. +1 подписчик