Labels

Monday, June 17, 2013

The TOR Proxy is Now Running

Well after some false starts and puzzlements, I was able to complete the TOR proxy that I wanted to put together.  I first followed the instructions at http://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point/ to get one of the RPis to work as an access point.  The problem that I was having was getting the hostapd to recognize the wireless adapter that I was using.  I tried three different wireless adapters (having gone to Staples to get the third) and could not get them to work.  When I tried looking through the logs with dmesg, I could see that the adapter was recognized and a driver was immediately launched, but hostapd was not able to work with it even though I put the name of the driver that was launched in the configuration file.  Then it dawned on me that having the driver name in the hostapd.conf file might mean that it was trying to install the driver.  So I removed it.  When I did, hostapd started working correctly.  All I can figure out is that I had updated the system and possibly the new version of the system automatically loaded a driver each time it got an adapter that it recognized.

I finished up the install and was able to get the RPi to work as a wi-fi access point, with a simple firewall and nat setup and the other connection through the ethernet port.  I then started following the instructions at http://learn.adafruit.com/onion-pi to get the TOR proxy working.  The instructions do not have you rebooting the RPi at particular intervals, and that turned out to be the problem child.  As soon as I rebooted to a known state, my setup started working as advertised.  I reset my managed switch to have a port open to the outside (my psuedo-DMZ), plugged in the RPi, and restarted it.  I was able to check it out using http://www.ipchicken.com and found that my ip was coming from the output of a TOR relay.  Success ... here is a picture of the finished product for what it is worth.