How to set up a Tor node in Ubuntu

tor ubuntu

Concern for maintain anonymity It is something that has accompanied users since the beginning of the Internet, although in recent years it has increased due to the greater possibilities of control by both governments and corporations. Thus, projects like Tor have come to light and have become increasingly sought after alternatives by users.

Although of course with its many differences Tor and BitTorrent they coincide in some aspects, for example in the fact that they need as many nodes as possible to guarantee that communication through them is fluid. The good thing is that we can all do our bit to help while benefiting from this, so let's see how to set up a tor node in Ubuntu.

To begin, we have to add the Tor repository to our /etc/apt/sources.list, which we do by adding the following two lines to said 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 -

Now we install:

$ apt-get update
$ apt-get install tor deb.torproject.org-keyring

Now that we have installed it we have to ensure that our time and geographical area are correct, for which the OpenNTPD package is required:

$ sudo apt-get install openntpd

The next step is to edit the / etc / tor / torrc file to define a port called OR Port (which is the port on which Tor 'listens' for incoming connections from other clients and nodes) plus another call DirPort (which is what Tor uses to send 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 y AccountingMax (that allows us set data transfer limit, after which Tor stops working as a node in our team) or RelayBandwidthRate y RelayBandwidthBurst (The traffic speed limit, and traffic speed peaks respectively). We must leave the options as we share them here below:

After saving the configuration file we have to restart Tor:

$ sudo service tor restart

Now when starting Tor our node connects to the network and for this it will try to verify that the ports that we have established are detected from the network. Once it does, it will upload the description of our node to the network, a fundamental step for other clients and nodes to be able to communicate with us and which may take a few hours to complete. While we wait for that 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 to work we can verify everything that happens from the command line, through the arm command that we just installed, and that will show us the traffic in and out of the node, along with the total amount of data sent and received, and the uptime of our server.

That's it, we are already part of Tor, not only to surf the net anonymously but also to serve and help others to do so too.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Aldo Castro Rocko I'm from Itzela said

    Hello, excuse my ignorance, but at the time of configuring the ports, I do not understand very well, can you explain if it is possible? Thanks. Very interesting post.