How to setup and use Tor Anonymity in Ubuntu

tor-vidalia-control-panel-ubuntu-11-04

Just before the new year, I saw a news article by Wired that highlighted flaws found in the Tor Anonymity Network. I had never used Tor, but I knew what it was, the benefits it could provide, and a bit about how it worked.

With a little free time on my hands I decided to set it up and see what all the fuss was about. At the time I was installing the Tor components in OS X, but I was curious about installing it in Ubuntu and the resources and instructions that I came across were not as straight forward as they could have been. That is where this post comes it, to provide a simple step by step guide with no fuss.

What is Tor?

This is how Wikipedia explains Tor:

Tor is a system intended to enable online anonymity, composed of client software and a network of servers which can hide information about users’ locations and other factors which might identify them. Use of this system makes it more difficult to trace internet traffic to the user, including visits to Web sites, online posts, instant messages, and other communication forms. It is intended to protect users’ personal freedom, privacy, and ability to conduct confidential business, by keeping their internet activities from being monitored.

What does it look like?

Tor itself doesn’t have a graphical user interface (GUI), but there is an application known as Vidalia which provides a nice and simple user interface for controlling all of your Tor needs.

tor vidalia control panel ubuntu 11 04 300x286 How to setup and use Tor Anonymity in Ubuntu

When installing Tor in Ubuntu, you will need to install 3 components: Tor, Polipo, and Vidalia. Tor and Vidalia should now be obvious to you (since I’ve explained that Vidalia provides a GUI to Tor).

Again, according to Wikipedia here is what Polipo is:

Polipo is a fast and lightweight, forwarding and caching proxy server, SOCKS proxy and computer software daemon.

Install Tor in Ubuntu

This is really quite simple and I could easily provide a simple bash script to automate all of this for you, but that would mean that I would have to maintain it and that you wouldn’t learn anything. icon wink How to setup and use Tor Anonymity in Ubuntu

For simplicity, I will write this guide assuming you are using Ubuntu 10.10, aka Maverick. If you’re using a different version, make sure you change the necessary bits below.

  1. Open “Software Sources,” select the “Other Software” tab, click the “Add” button at the bottom and paste the following:

    deb http://deb.torproject.org/torproject.org maverick main

    Click “Add Source,” then click Close. When it asks if you want to Reload, click yes and ignore any errors for now.

  2. Open a Terminal and add the Tor Repository keys and update Apt:

    gpg –keyserver keys.gnupg.net –recv 886DDD89
    gpg –export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
    sudo apt-get update

  3. Install Tor, Polipo, and Vidalia:

    sudo apt-get install tor tor-geoipdb polipo vidalia -y

    When prompted during the installation of Vidalia, select the option to permanently replace (or however it is worded).

  4. Download a pre-made config file for Polipo:

    wget https://gitweb.torproject.org/torbrowser.git/blob_plain/HEAD:/build-scripts/config/polipo.conf
    sudo mv /etc/polipo/config /etc/polipo/config.bak
    sudo mv polipo.conf /etc/polipo/config

  5. Now Stop and Restart both Tor and Polipo for safe measure:

    sudo /etc/init.d/tor stop
    sudo /etc/init.d/polipo stop
    sudo /etc/init.d/polipo start

    Open the application Vidalia when you would like to connect to the Tor network. If you want it on by default, you can always set Vidalia to autostart with your computer.

  6. All thats left is to configure your Applications to use the Tor proxies! If you don’t adjust the network settings of your applications to use the Tor proxy settings then you’re not using Tor at all. You can confirm that Tor is indeed working by visiting the Tor detector page.

If you run into issues for any reason, check back through the steps listed above. If that still doesn’t fix them, you might check the Community Ubuntu Documentation on Tor page or the official Tor for Linux/BSD/Unix page.

Configuring applications to use the Tor proxies

There are 2 types of configurations for Tor:

  1. HTTP or HTTPS – Typically used for web browsers such as Opera, Firefox, Safari, Google Chrome, etc.

    Host: 127.0.0.1
    Port: 8118

  2. Sockets – Typcially used for instant messaging applications such as Trillian, Digsby, MSN, AOL, Empathy, Pidgin, etc.

    Host: 127.0.0.1
    Port: 9050

Nearly any application that allows you to adjust network settings by using proxies can make use of the Tor Anonymity Network. Configuring your application of choice is a matter of selection to use HTTP or Sockets.

If you’re unsure, use trial and error. icon wink How to setup and use Tor Anonymity in Ubuntu

A great note that I came across on the Community Ubuntu Documentation page for Tor that I think everyone should read carefully before using Tor is as follows:

What’s the use of having Tor and Privoxy setup without enabling your new anonymous proxy in your common web applications? At this time Tor only supports HTTP and HTTPS traffic, but still recommends using Tor in your browser’s proxy settings for all protocols as a hidden image link can give away your IP address if linked to an image on an FTP site.

Conclusion

Hopefully by this point you’ve successfully configured Tor for all of your anonymity needs. Will Tor works great, it only works great if you’ve configured it correctly.

Some Tor connections may be slower than others. If you’re experiencing a connection that is simply too slow for your needs or if you need a new ip address so you can get that file from RapidShare without having to wait for an hour, simply open Vidalia Control Panel and click “Use a New Identity.”

Remember that Tor can be used for Windows and Mac, and is more straightforward to install for them as well.

While there have been a few flaws exposed, as mentioned before, I would tend to think the risk of being identified over Tor is very low since the attacks would have to occur on the same network that you’re connected to. I typically only use Tor at public internet access points (which is where these attacks would be most likely to occur), but it can be very handy in many situations and will likely continue to be on the list of my apps to install for a long long time.

Print this entry

Let There Be Snow

I came across a script online a few days ago and thought it would be a great seasonal addition to my blog, so now it’s live. I added it via a quick and simple WordPress plugin that I made in a couple of minutes so I can easily activate it when I want it.

Enjoy the snow flakes and start getting into the Holiday mood!

Print this entry

Happy Halloween

Halloween Design 2010-11-01 at 8.53.26 AM

Hope everyone had a great Halloween this year! If you missed visiting my blog, then you also missed my Halloween theme!

Screen shot 2010 11 01 at 8.53.26 AM 300x216 Happy Halloween

Thats about as far as my Halloween decorations went (other than dressing up as a pirate) this year, but I saw a lot of great looking jack-o’-lanterns this year and some really great costumes at Moogfest! Had a blast!

Here’s a quick video of this random guy dancing during Massive Attack. icon biggrin Happy Halloween

We got to see MGMT, Dan Deacon, Girl Talk, Thievery Corporation, Massive Attack, Shiongle, Disco Biscuits and a few others. Overall, it was a pretty amazing Halloween weekend! If only they were all that way…

Print this entry

Happy 22nd Birthday Jasmine!

jasmines-birthday-cake-22nd-gimp-modified-2009-04-13

I love my babe gurl Jasmine and I have to give her a special shout out for her 22nd Birthday!

I love you Jasmine. It’s been a great past 7 years (nearly icon cool Happy 22nd Birthday Jasmine! with you and I’m anticipating on many more great years to come!

jasmines birthday cake 22nd gimp modified 2009 04 13 300x225 Happy 22nd Birthday Jasmine!

I had to edit that picture from your 20th birthday cake to your new 22nd (in Gimp for all you nerds). icon biggrin Happy 22nd Birthday Jasmine!

I’m proud of you gurl and I want you to know how much I love you! I’m posting this song kind of as a “rite of passage” song. icon razz Happy 22nd Birthday Jasmine!

You’ve passed the 21 mark, now that you’re 22 everything will be different. No more special birthdays that you care about and no more benefits until you reach Senior Citizen status. icon razz Happy 22nd Birthday Jasmine!

You’ve been traveling on your (youth) road too long, the youth in you is dead and gone. icon razz Happy 22nd Birthday Jasmine!

Make the most of your special day. I’ll be right there with you every step of the way..until we part..by..dead and gone. icon wink Happy 22nd Birthday Jasmine!

I love you,
Kyle

Print this entry

Spring Break 2009

This year, I’ll be going off on what will hopefully be a fun filled week to Florida! I’ve never been to Florida when I really had time to just see what’s around so I’m really looking forward to it!

Hopefully I will get to take a lot of pictures. Maybe I’ll even post a few later. icon wink Spring Break 2009

Heading out the door…hope everyone enjoys their breaks as well!

Print this entry

UNIX: 1234567890 on Friday Feb. 13, 2009 @ 18:31:30

This coming Friday the 13th (ahhhh, bad luck!!!!) will be a unique day for me and everyone on earth!

This coming Friday the 13th will be the day that makes a milestone mark in the history of UNIX! That milestone has been running since midnight Coordinated Universal Time (UTC) of January 1, 1970, not counting leap seconds.

Basically, if you live if Eastern Standard Time (EST) like I do, then you will see this once in a life time event occur on:

Fri Feb 13 18:31:30 2009

Here is a quick screen shot that illustrates how to find the local time for you as well as the local time for me. icon wink UNIX: 1234567890 on Friday Feb. 13, 2009 @ 18:31:30

02 300x198 UNIX: 1234567890 on Friday Feb. 13, 2009 @ 18:31:30

If you want to check the time in your location then enter the following terminal command (compliments of  Gizmodo.com).

perl -e 'print scalar localtime(1234567890),"\n";'

Enjoy the day and maybe down a brew to celebrate the unique timing! Go UNIX!

Print this entry