This is an old revision of the document!
Want Tor on a Router? For fun and profit? Well here we go!
Hardware
We need the following:
- Raspberry Pi (Modell B, REV1 or REV2) ~40€
- A case for our Pi ~10€
- Transcend Extreme-Speed SDHC 16GB SDCARD ~12€
- Micro-USB 5V 1500mA Power Supply ~4€
- LAN Cable ~1€
- TP-Link TL-WN722N Wireless adapter ~12€
- D-Link DUB-H4 USB HUB ~18€
Makes a total of ~97€ for a rady-to-go Tor Hotspot. (amazon prices!)
Setup
Prepare the SDCard with the latest version of Raspbian.
wget -O /tmp/raspbian.img http://downloads.raspberrypi.org/raspbian_latest
dd if=/tmp/raspbian.img of=/dev/<YOUR SDCARD> bs=4M
- Plug the SDcard into the Pi
- Connect it with the LAN cable to your router/switch
- Connect the Pi with an HDMI cable to a monitor
- Connect the USB Hub to the Pi.
- On the HUB, connect an USB Keyboard and the Wireless adapter.
- Connect the USB Hub and the Pi to their power supplies and fire it all up.
Config
When raspi-config opens, tell it to expand the filesystem to the full size of your SDcard.
Next, go and enable the SSH daemon. Now you can change the hostname to something like "TorRouter".
Switch to the root user!
sudo su
Install Hostapd (does the Hotspot/Access Point) stuff, the DCHP server and Tor.
apt-get update && apt-get install isc-dhcp-server tor
For our setup we must compile Hostapd by hand as our TP-Link TL-WN722N uses a driver that's not enabled by the default raspbian hostapd.
apt-get install libssl-dev libnl-dev
wget http://w1.fi/releases/hostapd-2.0.tar.gz
tar xzvf hostapd-2.0.tar.gz
cd hostapd-2.0/hostapd
cp defconfig .config
nano .config
Uncomment the following line
#CONFIG_DRIVER_NL80211=y
Compile it!
make
make install