Onion Pi Created by lady ada Last updated on 2018-08-22 03:36:07 PM UTC
Guide Contents Guide Contents Overview Who is this good for? What is Tor? What you'll need Preparation Install Tor Test It! Do more... Set up as a Wifi-to-Wifi Tor middlebox Configure Tor to make your Exit Node in a particular country only Set up as a Tor Relay or Exit Node Donate to the Tor Project © Adafruit Industries https://learn.adafruit.
Overview Feel like someone is snooping on you? Browse anonymously anywhere you go with the Onion Pi Tor proxy. This is fun weekend project that uses a Raspberry Pi, a USB WiFi adapter and Ethernet cable to create a small, low-power and portable privacy Pi. Using it is easy-as-pie. First, plug the Ethernet cable into any Internet provider in your home, work, hotel or conference/event. Next, power up the Pi with the micro USB cable to your laptop or to the wall adapter.
Groups such as Indymedia recommend Tor for safeguarding their members' online privacy and security. Activist groups like the Electronic Frontier Foundation (EFF) recommend Tor as a mechanism for maintaining civil liberties online. Corporations use Tor as a safe way to conduct competitive analysis, and to protect sensitive procurement patterns from eavesdroppers. They also use it to replace traditional VPNs, which reveal the exact amount and timing of communication.
What you'll need You'll need a few things to run this tutorial: Raspberry Pi model B+ (http://adafru.it/1914) (or B) - Ethernet is required Ethernet cable (http://adafru.it/730) WiFi adapter (http://adafru.it/814) - Not all WiFi adapters work, we know for sure it works with the ones in the Adafruit shop! SD Card (4GB or greater) (http://adafru.it/102) with Raspbian on it. You can either copy the Raspbian image onto it or buy a ready-made Raspbian card (http://adafru.
Preparation This tutorial assumes you have your Pi mostly set up and have followed our "Raspberry Pi as Wifi Access Point" tutorial Please follow these tutorials in order to Install the OS onto your SD card (https://adafru.it/aWq) If you bought an SD card with Raspbian pre-burned on you can skip this step Boot the Pi and log into it (https://adafru.
Connect with a USB console cable (optional) (https://adafru.it/aUB) Handy for debugging especially when connecting to the access point hosted by the Pi When done you should have a Pi that is booting Raspbian, has working Ethernet, and you can connect to with a USB console cable and log into the Pi via the command line interface. Then follow our Pi-as-Access-Point tutorial (https://adafru.it/cg6)to set up the Pi as a wifi access point router.
© Adafruit Industries https://learn.adafruit.
Install Tor Essentially, this tutorial just follows the tor "anonymizing middlebox" writeup here. (https://adafru.it/cgb) If you hate typing a lot, this script from breadk will do it all (https://adafru.it/cge) for you! Make sure to read through the script to make sure you don't want to change anything! (More about how to use it here! (https://adafru.it/cgf)) We do suggest going step by step so you can have the experience of all the upkeep tasks. We'll begin by installing tor - the onion routing software.
Let's edit the host access point so it is called something memorable like Onion Pi - don't forget to set a good password, don't use the default here! sudo nano /etc/hostapd/hostapd.conf (Don't forget to do the AP setup step in "Preparation" before this!) Time to change our ip routing tables so that connections via the wifi interface (wlan0) will be routed through the tor software.
sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 22 -j REDIRECT --to-ports 22 Type the following to route all DNS (UDP port 53) from interface wlan0 to internal port 53 (DNSPort in our torrc) sudo iptables -t nat -A PREROUTING -i wlan0 -p udp --dport 53 -j REDIRECT --to-ports 53 Type the following to route all TCP traffic from interface wlan0 to port 9040 (TransPort in our torrc) sudo iptables -t nat -A PREROUTING -i wlan0 -p tcp --syn -j REDIRECT --to-ports 9040 Next you can check that the ip tab
Next we'll create our log file (handy for debugging) with sudo touch /var/log/tor/notices.log sudo chown debian-tor /var/log/tor/notices.log sudo chmod 644 /var/log/tor/notices.log Check it with ls -l /var/log/tor Start the tor service manually sudo service tor start Check its really running (you can run this whenever you're not sure, it something is wrong you'll see a big FAIL notice sudo service tor status Finally, make it start on boot sudo update-rc.d tor enable © Adafruit Industries https://learn.
That's it, now you're ready to test in the next step. © Adafruit Industries https://learn.adafruit.
Test It! OK now the fun part! It's time to test your TOR anonymizing proxy. On a computer, check out the available wifi networks, you should see the Onion Pi network Connect to it using the password you entered into the hostapd configuration file You can open up a Terminal or command prompt and ping 192.168.42.1 to check that your connection to the Pi is working.
your internet provider - in fact, if you reload the page it should change! Your web browsing traffic is now anonymized! BEFORE YOU START USING YOUR PROXY - remember that there are a lot of ways to identify you, even if your IP address is 'randomized'. Delete your browser cache, history and cookies (some browsers allow "anonymous sessions") and read https://www.torproject.org/ for a lot more information on how to use TOR in a smart and safe way © Adafruit Industries https://learn.adafruit.
Do more... Now that you have this project set up, you can do more... Set up as a Wifi-to-Wifi Tor middlebox We use Ethernet because it requires no configuration or passwords, just click the cable to get DHCP but if you want, its possible to set it up as a WiFi-to-WiFi proxy. You'll need two WiFi adapter, then edit /etc/networks/interfaces to add wlan1 and enter in the SSID/password for your Internet provider using our WiFi tutorial (https://adafru.