• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Raspberry Pi as a TOR node

    Blog entry posted in 'Uncategorised', December 30, 2012.

    TOR is a privacy/anonymity network. Information about TOR can be found here: https://www.torproject.org
    Anonymity is provided by TOR by the fact that, when you browse the web through it, your IP address is unknown, and your IP traffic is encrypted between your computer and an "exit node" (which is another computer that actually makes the link between the TOR network and the web site you are looking at). There are also hidden services within the TOR network that allow you to use Instant Messaging (TorChat) or other services within the TOR network without an exit node. Such hidden services are encrypted end-to end. The TOR network also provides "Bridge" nodes, so that people living under repressive regimes can access the internet without government censorship (such as what's known as the "Great Firewall of China).
    "But i live in a free country, where censorship and spying don't exist.....".... Think again.... Facebook and Google are prime examples of services we use on the internet that can be used by governments, and even private entities to spy on people.... Check out this video, and you'll see what i mean https://archive.org/details/EbenMoglen-FreedomInTheCloud2010 and this one http://archive.org/details/LauraPoitras-SurveillanceTeach-in

    So if you want to protect your privacy on the internet, a TOR node will be a step in the right direction. TOR basically functions similar to a VPN tunnel, but can access a much wider range of services, and buries you in a much larger "cloud" of users.

    So to install TOR on the Pi:

    Code:
    sudo apt-get install vidalia

    this installs Vidalia (a GUI based configuration and monitoring tool for TOR) and TOR.

    Then, if you want to have an encrypted, decentralized (doesn't go through a central server like yahoo, jabber or IRC) chat service:
    Code:
    sudo apt-get install torchat


    Configuring TOR:
    When you start Vidalia (it's in the Internet portion of the start menu), it starts an instance of TOR as a basic node. with this basic node, about all you would use it for would be to browse the internet. First wait until you see a green onion icon, and vidalia says "Connected to the Tor network", then open a terminal window and type
    Code:
    torify midori

    This will open the Midori web browser, with one important difference, it's connection to the web runs through 3 TOR nodes and an "Exit node". you can see whether TOR is working with Midori, as well as the IP address of the exit node (when you browse the web, web pages see this IP address, not yours) by navigating to
    Code:
    https://check.torproject.org/

    You may want to configure that page in Midori as the default home page.
    Now that you have verified that Midori is working properly through TOR, make sure you read the following page:
    Code:
    https://www.torproject.org/download/download-easy.html.en#warning


    Some notes about using the Vidalia config tool on a PI:
    If you're using a composite video monitor instead of an HDMI monitor, you will find that the Settings window won't resize, and you can't see the buttons at the bottom. this means you have to use the keyboard to "click" them. When you are finished making your configuration changes, click on the "Appearance" icon, hit three times, and hit , and this clicks the OK button (or twice for the button) or use the keyboard shortcut ALT o for OK or ALT c for Cancel. The other way to change your TOR configuration is to edit /home/pi/.vidalia/torrc manually using the "nano" editor... but make sure any changes you make that have like entries in vidalia.conf, are changed in vidalia.conf as well, otherwise vidalia will change torrc back to what's in vidalia.conf.
    You may want to set up your TOR node as a "Bridge node", which will help people in countries where the internet is censored, go around their national firewall, and reach the internet uncensored (and un-tracked). I haven't done this yet with my Pi, since I am already running a bridge node on my main machine. I am, however running a hidden service on my Pi, which is a web page at the following address opnju4nyz7wbypme.onion
    If you enter that address in a torified browser, you will see a page where you can chat with VIKI (borrowed the name from the "I Robot" movie). as well as an example of a 404 page if you click on the chatbots link. If you know TOR is working, and you can't bring that link up, let me know by leaving me a Private Message on this board. I'm still adding stuff to the Pi, and "playing" with it, so it might just be that i didn't have TOR running at the time. One of the advantages to this hidden service is that it provides a web page with a "fixed" address, even though your ISP might change your IP address on a regular basis. I'll explain more about this in the next installment, which will be about installing the Apache web server on a Pi, configuring it, and adding content. I will also explain how to configure Tor to provide your web page as a hidden service.

    Using TorChat is rather simple. Run TorChat from the same menu as you found Vidalia. The window will open up, and will show a user icon with 16 character string and (myself). This provides a method to twst whether TorChat is working. Once the user icon turns green, you can open a chat window and type a test message, and the message goes out to the TOR network, gets routed back to you, and shows up echoed on the chat window. To add somebody else's onion address, right click on the user list window, and select "Add contact". enter their onion address in the "TorChat ID" box, and their name in the "Display name" box and hit . If you know they are online, but their icon doesn't turn green, wait. It takes anywhere from 5 to 20 minutes to get a valid online status at first. If you type in any messages to them in the meantime, you will see the message appear in the chat window with the message . Once your TorChat node has connected to theirs, any delayed messages are exchanged, and you are ready to chat. TorChat loads it's own instance of TOR, and i emailed the developer (Berndt) of TorChat to see if there was any way to get it to use an already running instance of TOR, and he replied "not at this time, but I am working on it".
    If you want to find out if TorChat really works, try this TorChat ID vhkj3dygswrcnxdn and if my Pi is running, it will connect with my Pi. I, however do work for a living, and I might not answer you until I get home from work, or whenever the next time I look at my Pi's screen. But you will see that it connects, and the user icon turns green. if the icon is yellow, it means I have the Pi running, but have set my status as "away" (unfortunately, there's no timer to automatically set the status, so if it's green and i don't answer, i might have forgot to change the status).
    You can also send files over the Torchat connection by right clicking on an open chat window, and selecting "send file". That's the method i've been using to transfer screenshots to my main computer, so i can post them on this blog.

    One warning: PLEASE DO NOT use TOR for downloading or sharing torrent files. It slows down the TOR network, and has the potential to get people who run exit nodes in very deep doo-doo, even though they have done nothing wrong. It also can remove your anonymity over TOR, because all somebody has to do is simple traffic analysis to find out who is downloading a particular file, Monitoring the exit node for the torrent packets, and monitoring your ISP would reveal that YOU are the one downloading a particular torrent. This is because torrents have a particular traffic pattern, and TOR doesn't have enough latency to hide the fact that you are downloading a torrent file.

    So, next time, we'll set up a web server on the PI, populate it with content, and set up a hidden service to make it available to TOR users.

    Comments
 

EE World Online Articles

Loading

 
Top