The road to TOR
Happy Independence Day to all. I had been looking forward to this day so I can use to share with my brothers and sisters what little I know about TOR . Independence means so many things to many people. For me, it means having freedom, valuing it and using it to benefit not just to ourselves but to people at large. And for that to happen, at least on the web, it has to rise above censorship if we are to get there at all. I am 40 years old, and if I can’t read whatever I want to read without asking the state-military-Corporate trinity than be damned with that. Debconf was instrumental as I was able to understand and share many of the privacy concerns that we all have. This blog post is partly a tribute to being part of a community and being part of Debconf16.
So, in that search for privacy couple of years ago, I came across TOR . TOR stands for ‘The Onion Router’ project. Explaining tor is simple. Let us take the standard way in which we approach the website using a browser or any other means.
a. We type out a site name, say debian.org in the URL/URI bar .
b. Now the first thing the browser would do is look into its DNS Cache to see if the name/URL has been used before. If it is something like debian.org which has been used before and is *fresh* and there is content already it would serve the content from the cache there itself.
c. In case, if it’s not or the content is stale or something, it would generate a DNS lookup through the various routing tables till the DNS IP Address is found and information relayed to the browser.
d. The browser takes the IP Address and opens a TCP connection to the server, you have the handshake happen and after that it’s business as usual.
e. In case if it doesn’t work, you could get errors like ‘Could not connect to server xyz’ or some special errors with error codes.
This is a much simplified version of what happens or goes through normally with most/all of the browsers.
One good way to see how the whole thing happens is to use traceroute and use the whois service.
For e.g. –
[$] traceroute debian.org
[$] whois 188.8.131.52 | grep inetnum
inetnum: 184.108.40.206 - 220.127.116.11
Just using whois IP Address gives much more. I just shared a short version because I find it interesting that Debian has booked all 255 possible IP Addresses but speculating on that would be probably be a job for a different day.
Now the difference when using TOR are two things –
a. The conversation is encrypted (somewhat like using https but encrypted through the relays)
b. The conversation is relayed over 2-3 relays and it will give a somewhat different identification to the DNS server at the other end.
c. It is only at the end-points that the conversation will be in plain text.
For e.g. the TOR connection I’m using atm is from me – France (relay) – Switzerland (relay) – Germany (relay) – WordPress.com . So wordpress thinks that all the connection is happening via Germany while I’m here in India. It would also tells that I’m running MS-Windows some version and a different browser while I’m from somewhere in India, on Debian, using another browser altogether 🙂
There are various motivations for doing that. For myself, I’m just a private person and do not need or want that any other person/s or even the State should be looking over my shoulder as to what I’m doing. And the argument that we need to spy on citizens because Terrorists are there doesn’t hold water over me. There are many ways in which they can pass messages even without tor or web. The Government-Corporate-Military just get more powerful if and when they know what common people think, do, eat etc.
So the question is how does you install tor if you a private sort of person . If you are on a Debian machine, you are one step closer to doing that.
So the first thing that you need to do is install the following –
$ sudo aptitude install ooniprobe python-certifi tor tor-geoipdb torsocks torbrowser-launcher
Once the above is done, then run torbrowser-launcher. This is how it would work out the first time it is run –
Tor Browser Launcher
By Micah Lee, licensed under MIT
Creating GnuPG homedir /home/shirish/.local/share/torbrowser/gnupg_homedir
Downloading and installing Tor Browser for the first time.
Latest version: 6.0.3
Launching './Browser/start-tor-browser --detach'...
As can be seen above, you basically download the tor browser remotely from the website. Obviously, for this port 80 needs to be opened.
One of the more interesting things is that it tells you where it installs the browser.
/home/shirish/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/start-tor-browser and then detaches.
The first time the TOR browser actually runs it looks something similar to this –
Additionally it would give you 4 choices. Depending on your need for safety, security and convenience you make a choice and live with it.
Now the only thing remaining to do is have an alias for your torbrowser. So I made
[$] alias tor
It is suggested that you do not use the same usernames on the onion network.
Also apart from the regular URL addresses such as ‘flossexperiences.wordpress.com’ you will also see sites such as https://www.abc12defgh3ijkl.onion.to (fictional address)
Now there would be others who would want to use the same/similar settings say as there are in their Mozilla Firefox installation.
To do that do the following steps –
a. First close down both Torbrowser and Mozilla Firefox .
b. Open your file browser and go to where your mozilla profile details are. In typical Debian installations it is at
In the next tab, navigate to –
c. Now copy the following files over from your mozilla profile to your tor browser profile and you can resume where you left off.
logins.json (Firefox 32 and above)
signons3.txt (if exists)
and the following folders/directories
chrome (if it exists)
searchplugins (if it exists)
Once the above is done, fire up your torbrowser with the alias shared. This is usually put it in your .bashrc file or depending on whatever terminal interpreter you use, wherever the config file will be.
Welcome to the world of TOR. Now, after a time if you benefit from tor and would like to give back to the tor community, you should look up tor bridges and relay. As the blog post has become long enough, I would end it now and hopefully we can talk about tor bridges and relay some other day.