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.

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. ;)

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. ;)

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.

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!

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!

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. :D

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…

Happy Halloween 2009

Just wanted to say Happy Halloween to everyone this year! I hope to see some good costumes this year!

Just to let everyone know, if you dress up as Digsby or just take a picture of yourself dressed as Digsby then you can win a free t-shirt!

I hope everyone catches at least one good Halloween movie today! Have fun!

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. ;)

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

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. ;)

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!

Merry Christmas 2008

jesus
With the new year just around the corner, I think it’s time for me to say Happy Holidays! Eat well and enjoy the company of your family. ;) May all of your wishes and New Years resolutions come true!

Merry Christmas to all and to all a good night!

Selling Trees and Christmas Spirit

It’s been slow this year selling Christmas trees. It’s very obvious that people just aren’t nearly as loose with their earnings as they have been in previous years.

It’s all good and still a lot of fun, but I haven’t had time for much else other than selling lately.

It’s funny to see the different types of buyers. Just to stereotype a little (hopefully in a non-offensive way…my apologies in advanced), here are the different things that I noticed:

  • Men, when shopping for a tree alone, tend to spot all of the trees in the height range they are looking for as they walk in. After looking over a select few, they narrow down to the best all in a matter of 3-5 minutes.
  • When families shop (parent(s) and child(ren)), the husband tends to stand back and approve or disapprove the children’s pick while trusting or accepting the wife’s pick. The wife is usually mingling in the trees with the children and looking along with them. The husband handles the payment process always unless he prefers to load the tree himself, where his wife pays. Usually takes 20-30 minutes.
  • Couples choose a tree similarly to families, with the male approving of the wives pick and not so much just going along with anything. Basically he has more input and always handles the payment. Usually takes 5-10 minutes.
  • Just women or mothers and their children seem to take much longer, inspect every tree multiple times, decide on one then change their mind and go with the second pick (happens about 50 percent of the time). Usually takes ~20 minutes.
  • Then there is that rare retired couple who come through and want to help by purchasing any Charlie Brown trees. They are usually the most genuinely kind customers and usually take 3-5 minutes.

That’s a pretty brief set of descriptions of the Christmas tree shoppers I see. It’s fun to watch, but they are very predictable. Sales are also pretty predictable. You usually know before you say “Hello” whether or not they will buy a tree from you or if they will want to “shop around a little more” or “check with their wife or husband before they purchase and then come back.”

Like I said before though, it’s all fun. Especially seeing the children light up when they get to pick the tree. They love it so much. It’s really cool. ;)