Deploy Tor in Linux for anonymous access to the internet
I do a lot of research around the internet on a daily basis. From information on cybersecurity, electronics, specifics on software development languages and many other subjects of interest to me.
So I’m not doing anything stupid on the internet but I’m also not interested in having the mega data collectors of the internet tracking my surfing habits for target marketing or anything more weird with the data they collect on everyone when present on the internet.
My trust on the data collectors is at all time low and that’s a fact. The least they know about me the better.
Even though I run Windows 10 on my laptop when it comes to internet access and a lot of the work I do on a daily basis I use Linux for that. To do my work I built a vm with Virtualbox which runs Centos7.
Every time I start my laptop I also start the vm and all my internet browsing is done from the vm.
If you got to this point most likely you are already familiar with the Tor project so I’m not going to explain what it is.
The first step is to install Tor in Linux. In my case I use CentOs 7 so from the command line I issue yum install tor.
Once Tor is installed you need to start the Tor service. Again in CentOs in the command line type systemctl start tor. To make sure it is running type systemctl status tor. You should see something like the screenshot to the right. It should show the service as active (running).
When it comes to installing the Tor infrastructure in Linux it couldn’t be simpler.
Configuring the browser
The second part of the installation consists of configuring your browser to use the Tor network when you access the internet. You do this by configuring your browser to access the internet using the Tor service you installed as a proxy.
In my case in most cases Firefox is the default browser in the Linux distros so the steps and screenshots in this article refer to Firefox. It should be as easy and similar to configure any other browser.
Click the configuration menu on the right hand side of the browser as it shows in the picture to the left and click Preferences. Click Advanced and select the Network tab. Click Settings to open the Connection Settings dialog.
This is the dialog where you setup the Tor proxy. Configure your Connection Settings exactly as it shows in the picture “Configure the Tor proxy”. This will tell your browser to use the Tor service you installed and it will create encrypted connections through the Tor network for each tab you open allowing you to anonymously surf the internet.
Remember that using the Tor network your connections get routed through multiple servers so accessing the internet this way is slower.
To confirm your connections are going through the Tor network open the browser and type https://check.torproject.org/. If it all went well you’ll see a page similar to the one to the right.
If you have security monitoring sensors in your network the likes of Security Onion you should also see alerts telling you someone in your network from the IP address of your vm is showing TOR traffic. This is another indication that your setup is working as expected.
With this said and done be careful what you do on the internet. Even though this gives you a high level of anonymity while surfing the internet it won’t guarantee 100% anonymity. If you go around doing stupid stuff it might take a while but eventually you’ll still get caught. Remember that our security agencies have plenty of time on their hands and as many resources as they need. Give them a reason and they will chase you down! And will eventually get you.
By the way, if you are looking into having the data gathering monsters to stop collecting your surfing habits you probably want to think about retreating from most of the social networking sites. Kinda make sense right?