The concern for maintain anonymity it is something that has been accompanying users since the beginnings of the internet, although in recent years it has increased due to the greater possibilities of control by both governments and corporations. Thus, projects such as Tor have come to light and have become increasingly sought after alternatives by users.
Although of course with their many differences Tor and BitTorrent agree in some respects, for example in the fact that they need as many nodes as possible to ensure that communication through them is smooth. The best thing is that we can all put our grain of sand to help while we benefit from it, so let’s see how to configure a Tor node in Ubuntu.
For starters, we have to add the Tor repository to our /etc/apt/sources.list, Which we do by adding the following two lines to this file:
deb http://deb.torproject.org/torproject.org utopic main deb-src http://deb.torproject.org/torproject.org utopic main
Then we add the public key:
gpg --keyserver keys.gnupg.net --recv 886DDD89 gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
$ apt-get update $ apt-get install tor deb.torproject.org-keyring
Now that we have installed it we must ensure that our schedule and geographical area are correct, for this the OpenNTPD package is required:
$ sudo apt-get install openntpd
The next step is to edit the / etc / tor / torrc file to define a named port ORPort (Which is the port on which Tor ‘listens’ for incoming connections from other clients and nodes) more than another called DirPort (Which is what Tor uses for sending data). Both ports must be enabled in the configuration of our router, and then we must modify the operating policy of our node through options such as AccountingStartMonth i AccountingMax (That allows us set the data transfer limit, After which Tor stops working as a node on our computer) or RelayBandwidthRate i RelayBandwidthBurst (the traffic speed limit, And traffic speed peaks respectively). We must leave the options as we share them below:
After saving the configuration file we have to restart Tor:
$ sudo service tor restart
Ara, at startup Tor our node connects to the network and so it will try to check that the ports we have set are detected from the network. Once it does, it will be responsible for uploading the description of our node to the network, a key step for other clients and nodes to communicate with us and which can take a few hours to complete. While we wait for this to happen we can install the tor-arm tool, which will allow us to monitor the operation of our node:
$ sudo apt-get install tor-arm
When Tor starts working we can verify everything that happens from the command line, using the arm command that we recently installed, and that will show us the node inbound and outbound traffic, along with the total amount of data sent and received, and the uptime of our server.
That’s all, we’re already part of Tor, not only to surf the net anonymously but also to serve and help others to do the same.