Time to start another project
So it’s time to start another project. Beside some other ideas (I directly ordered another one) I’d like to use this device to donate some of the bandwidth of our internet connection to the TOR network (https://www.torproject.org/)
This page describes the required steps. The TOR project needs more nodes. So reproduction of this work is very welcome.
Some background information
The TOR network offers anonymous communication over the internet by routing the traffic via a set of TOR servers that are randomly chosen. More details on TOR can be found under http://en.wikipedia.org/wiki/Tor_(anonymity_network).
Obviously, TOR needs a large amount of servers. As the TOR network is not a commercial organisation, it requires voluntary supporters.
Setting up the base system
In the time that I hvae been waiting for my rPI the community has been very engaged. My favorite OS for servers has been ported to the hardware. I prefer debian for all headless systems and like the way that apt maintains the software.
To set up the base system I followed the instructions givenin http://www.raspbian.org/RaspbianInstaller. This will install a very basic system.
I don’t like working as root constantly. Therefore, I also installed the packet for “sudo” via
apt-get install sudo (as root)
You also need to add the user account that you created to the list of sudoers. To do so, run
and add the line
user ALL=(ALL) ALL
while replacing “user” with the name of the user that you want to add.
After having installed the system plase consider running regularly
sudo apt-get update
sudo apt-get upgrade
to make sure that you have the latest security patches installed.
After having installed the base system I configured the network interface via
sudo nano /etc/network/interfaces
By default the system obtains an IP adress from the local DHCP server (which is a Fritz.Box in my case). However, I prefer to have a static IP address for some systems in my network. So I changed the default setting
iface eth0 inet dhcp
iface eth0 inet static
Fortunately, the TOR package is available for the raspbian OS already. So installing TOR can be done via
sudo apt-get install tor
The whole configuration for TOR is stored in the file /etc/tor/torrc. In order to run TOR as a relay I use the following torrc:
Log notice file /var/log/tor/notices.log
ExitPolicy reject *:*
RelayBandwidthRate 100 KB # Throttle traffic to 100KB/s (800Kbps)
RelayBandwidthBurst 200 KB # But allow bursts up to 200KB/s (1600Kbps)
If anybody is reproducing this work I’d appreciate if you could use the same nickname for the rPi.
Tunneling the firewall
My rPI oeprates behind my Fritz.Box as a firewall. In order to allow other nodes in the TOR network to contact my rPI it has been necessary to two ports in the firewall (9030 for the directory service and 9001 for the actual operation of the relay).
Checking for connectivity
After setting up the configuration, you should restart the TOR service by:
sudo /etc/init.d/tor restart
Afterwards you should check for the entries in the log file /var/log/tor/notices.log and search for an entry similar to
Self-testing indicates your ORPort is reachable from the outside
After a few more hours of operation of your node you may also check your system via the URL https://atlas.torproject.org/#search/rasptor.