How to set up TOR from source

In this post I’ll show you how to set up TOR (The Onion Router). You can use TOR to surf anonymously but I recommend NOT to use services with logins which can be connected to your real identity, e.g. email, instant-messanger, etc. You don’t know how the TOR-exit node is configured.

You will need Tor and Vidalia. Vidalia is a TOR-Controller with a simple GUI. You can find both here:

I had to install libevent to compile TOR successfully.

Installing TOR:
Untar the archive and change the directory to the TOR directory.

tar xzf tor-; cd tor-

The next step is to configure and compile TOR.

./configure && make

And the last step is to install it:

make install

If everything runs without errors, TOR is now installed. The next step is to install Vidalia.

Installing Vidalia:
The first step is to untar the archive.

tar xzf vidalia-0.2.20.tar.gz && cd vidalia-0.2.20

The next step is to compile vidalia, but we have to use cmake first and then make.

mkdir build && cd build
cmake ..

Vidalia will be placed to build/src/vidalia. If you want to install Vidalia to /usr/bin you can run make install

The installation is completed now. But we have to set up a connection to the TOR network and configure the browser to use TOR. To connect to the TOR network start Vidalia, it will establish a connection to the TOR network. If no error occurs during the Vidalia start, you’ll be able to use TOR. Let’s try it:

curl --silent | grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'

This will show you your current ip-address (without TOR). Now let’s try it with TOR. The only thing we change is to use the local SOCKS proxy at port 9050.

curl --silent --socks5 | grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'

Now your ip-address is the ip of the TOR exit node.

To configure your browser to use TOR you have to enter the local SOCKS proxy (ip/hostname: port: 9050) to your browser configuration. I use Firefox with FoxyProxy this makes it a bit simpler to switch the proxy or to disable the proxy.
You can visit this page to check if your browser uses TOR.

Posted on October 15, 2012, in Configure, Install, Network, Security and tagged , , , , . Bookmark the permalink. 2 Comments.

  1. I have been trying many ways to run curl with tor. Your article really makes my days. Thank you very much


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: