Create your own TOR node with Raspberry Pi

TOR

Surely on more than one occasion you have heard about TOR since it is the perfect way to navigate and browse the Deep Web. With this software, Internet traffic is redirected through a network of servers or nodes created by volunteers and distributed all over the world in such a way that the anonymous browsing of the user himself is guaranteed while his location is hidden since, thanks This method makes it extremely difficult to track a user across the entire network.

If you are a TOR lover and you want to help the service to make it bigger and bigger, today I want to show you how to configure a Raspberry Pi to serve as a node within the network. If you are interested, tell you that, as previous steps, it is necessary to have at your disposal a Raspberry Pi (obviously), a power supply to be able to introduce electricity into the Raspberry Pi, a network cable, internet and an SD card with the software Raspbian already installed on the card.

Initial setup

If you are an advanced unix user, you will surely know that it is not recommended to work as a user at all times «broken»Or super administrator, because of this we are going to carry out the following steps.

- We open a terminal and write the following orders.

apt-get install sudo
tor adduser
tor passwd

With these simple commands we create a user «Thu»And we set a password«Passwd«, Change this word for a much safer one, I recommend you at least 8 digits where you mix letters, numbers and some special character.

Once this step is done, we add the user account to the sweat list:

nano /etc/sudoers

We add these lines.

Tor ALL = (ALL) ALL

Finally we finish this first step with an update of security patches and possible pending updates of the platform. This step must be done very regularly. Keep that in mind!

sudo update apt-get
sudo apt-get upgrade

Network settings

Once we have made all the basic configuration and the user with whom we will work created, it is time to configure the network interface. For this we open a terminal again and write this command:

ipconfig

With this we will get the system to respond to us with the current configuration of our network. In my case something like this:

eth0 Link encap: Ethernet HWaddr 00:23:54:40:66:df inet addr:192.168.0.20 Bcast:192.168.0.255 Mask:255.255.255.0

Copy on a piece of paper two pieces of information from this query, inet addr y mask as we will need them later. Next we write:

sudo nano /etc/network/interfaces

In the response we must look for a line that looks like the following:

iface eth0 inet dhcp

As you can see, our Raspberry Pi gets its IP address from the local DHCP server. If we want a static IP we must make a few changes and leave the file as follows:

del iface eth0 inet static
address 192.168.0.20 <- Debes escoger una IP que esté libre en tu red. Esta debe servir tan sólo como ejemplo.
netmask 255.255.255.0 <- Esta debe ser la mask que hemos copiado previamente.
gateway 192.168.0.1 <- Debes introducir la puerta de entrada de tu red

TOR

TOR installation and configuration

This is one of the most important and easiest steps of this entire mini-tutorial. We begin:

sudo apt-get install tor

To carry out this step, bear in mind that you must be connected to the internet. The download and installation will start automatically, so this step will take you some time, it all depends on the speed of the network. Once this step is done, it is time to configure TOR, for this we must modify a file that is at the address / etc / tor / torrc and add or modify these lines:

SocksPort 0
Log notice file /var/log/tor/notices.log
RunAsDaemon 1
ORPort 9001
DirPort 9030
ExitPolicy reject *:*
Nickname xxx (sustituye xxx por el nombre de usuario que quieras)
RelayBandwidthRate 100 KB # Throttle traffic to 100KB/s (800Kbps)
RelayBnadwidthBurst 200 KB # But allow bursts up to 200KB/s (1600Kbps)

Possible problems with the firewall

As with any server connected to the network, you can have problems with your firewall. To allow other nodes on the TOR network to contact your new server you must open ports 9030 and 9001. These directories have a very specific use since, for example, port 9030 is for the directory service while 9001 is for the operation of the server itself. To do this there are many tutorials on the net that tell you how to do it depending on your break and system.

We start the TOR server

After all the changes made in the system arrives element of restart TOR. For this, write the following line in a terminal:

sudo /etc/init.d/tor restart

With this TOR command you will restart the system and, if everything went well, when you open the log file:

less /var/log/tor/log

you must find one entry similar to this:

Jul 24 22:59:21.104 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.

With this already we would have our TOR node fully operational and working correctly. In order to browse the TOR network, you must install a TOR client that will be in charge of making you able to browse the TOR network completely anonymously.


A comment, leave yours

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.   sweat said

    Is this setup safe for raspi ?.

    The tutorial does not indicate the type of tor node that will be created, there are more secure or less secure depending on whether they are input, intermediate or output. As well as certain additional security configurations to take into account with this anonymous network.