Low budget TOR Device

For most people would be boring and also difficult install and setup software package to let them surf anonymously into the web, at this point it is possible make a plug and play low budget domestic device in an easy way, just follow the steps in this tutorial.

The low budget device is called Raspberry Pi and the Tor Network will be over it . Find here what exactly is Raspberry Pi, also what exactly is Tor.

Tor in the Raspberry Pi

The first step have written in the before post, once you become your Raspberry Pi in an access point, you will be able to install the additional packages. Tor install a text file called torrc that contains configuration instructions concerning how Tor package will works.

The first step is install Tor in the the Raspberry pi, many post agree with is better compile the TOR package, and certainly that is true, you can get the last version of Tor with all the last fixed bugs, but aims to get the things easy, I get the package from the repository, this install the Tor version [Release april 12 2012]. This is enough for our purposes.

~$ sudo apt-get install tor

Once you have installed Tor is important have into account a log concerning what is happening inside Tor process, thus as the first step of configuration you have to uncomment one line of the default configuration. Below is showed how the file have to look like, see line number 37.


As a second step  you can also uncomment line number 48 to let Tor run as a daemon. In the below picture is showed.


The first two lines of the picture above, related with torrc file [37, 48] are commented by default, so you can uncomment those ones as i did, the other part is the tipycal transparent proxy configuration; this configuration will carry on all traffic throught Tor network. All the request you do to your DNS will be redirected to the 9040 port.

Let’s check the other lines:

Lines [194, 196, 198] is the IP local address, for this case the Raspberry Pi address

Lines [199, 200] are there just in case you want to exit for an specific country, you can ommited them if you do not care about the country you want to reach an specific website, this lines could be useful to use services that only are avaible in others countries like Netflix service.

Now modify the /etc/resolv.comf file to avoid the DNS leakage

~# echo nameserver /etc/resolv.conf

The last step in our Tor low budget device is make it run always you reboot your Raspberry (Just to let it plug and play).

~$ sudo update-rc.d tor enable

The Firewall Configuration Iptables

Once you have your tor file configured is time to lead your traffic in a strategic mode.

~$ sudo iptables -t nat -A PREROUTING -i wlan0 -p udp –dport 53 -j REDIRECT –to-ports 53

With the above rule all the DNS request will be redirect to the DNS port, that measn through the Tor network. Then just with other rule you can redirect all the TCP traffic throught Tor network too.

~$ sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp –syn -j REDIRECT –to-ports 9040

The above rule tell iptables to transparently redirect tcp traffic destined for the Tor virtual address space through the Tor transport port you designated in the configuration file above. Now any onion addresses will be resolved, mapped into the 9.192/10 space, and transported through Tor.

Finally you have to save the firewall rules.

~$ sudo sh -c iptables-save > /etc/iptables.ipv4.nat

Top Bonus: I found a cool tool to monitoring the behavior of tor network, the package is called tor.arm, to get it just install it from the repository.

~$ sudo apt-get install tor-arm

Now just type the follow command and let it work.

~$ sudo -u debian-tor arm


With this tool you can monitoring the bandwidth, cpu, memory usage, relay’s current configuration, logged events, connection details (ip, hostname, fingerprint, and consensus data) etc.

Hope you find this post useful.

Up votes: Down votes:

Volume control Music [Lilypad Acelerometer]

This project start to and research for experiment with electronics element over different sort of cloth, through an open call to build wearable electronics stuff, was possible join the team designers, and artist people to create the future wedding dress. This is how the dress looks like:

Future Wedding  Dress

The dress is composed for 2 circuits, one of those circuits is a luminescent circuit that is activated for each step the girl gives. The circuit is composed for 4 Power LED’s of 1 Watt and around each of them 3 textil leds, these are activated for a textil switch who is in the feet of the girl.   The other circuit is a volume control for a Linux media player, who is controlled for an accelerometer placed in the arm of the dress. This project was made with different devices:

  • Lylipad + Acelerometer
  • Raspberry Pi
  • Hc-05 Bluetooth
  • Speakers, input 3.5mm jack

Preparing Raspberry PI OS

For this project I use a light version of Debian for ARM devices called minibian the connection was managed by the serial port, using an FTDI interface.

Using the FTDI interface
Using the FTDI interface

Note: To establish the connection it is necessary made some changes in the Minibian boot files, the first change is to add the following code line:

T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Paste it at the end of the follow path /etc/inittab Update and upgrade the Raspberry Pi

#apt-get update & apt-get upgrade

At this point we need to install the packages to allow the Pi play sounds, install the following packages:

#apt-get install alsa-utils mpg123 mpd mpc moc

Reboot the pi and finally load the sound driver and set up the 3.5mm output jack

# modprobe snd_bcm2835

# amixer cset numid=3 1

Now we can use Lylipad and Raspberry Pi to work with,

Up votes: Down votes: