Easy and secure anonymous internet usage

As of June 2012 all updates regarding the (fast) gateway will be posted on github.

Short version:

An easy and secure way for anonymous internet usage:

  1. Install and start Virtualbox (at least version 4).
  2. Download two VM images: Tor gateway and Tor workstation
  3. Import the images (in Virtualbox File->Import Appliance)

To start using the internet anonymously you just have to start both VMs Tor gateway VM and Tor workstation VM. As soon as they they finished booting, you can use the anonymous internet access through the Tor workstation. If you want to stop using the internet anonymously, just power down both VMs.

Long version:

The goal of this article is to provide a solution to use the internet anonymously in an easy and secure way. Anonymous as in no one but you must be able to tell that you are communication with a certain receiver (like browsing a website: No one must know that you are surfing that certain website). A way to use the internet anonymously is to use an internet connection that can not be tracked down to your person and a computer that has no information stored about you. Which means quite an effort every single time you want to use the internet anonymously. For an internet connection that can not be tracked down to your person, software like Tor has been developed to accomplish this also over a non-anonymous internet connection. Checking if the computer has no information stored about you, can not be handled by the Tor software and must be handled by the user! Currently there is one major problem if you want to use the internet anonymously: You really do have to understand the functioning of computer networks and the Tor software to a degree that is far away from being trivial – otherwise you might probably use the software in an insecure way. Let me give you some examples:

  1. Install the Tor client to your Operating System and configure your browser to use the local TOR client through SOCKS-proxy functionality of Tor (or use extensions like Torbutton for Firefox to do that for you). While this is quite easy to accomplish, it has a major security drawback: If you use your everyday browser it has a lot of information stored about you and your browsing history and behavior which it might leak. Even if you use some other browser, you must turn of all plugins like Java or Flash and disable Javascript (or use a proxy like Privoxy to do that for you) so they can not leak information like which sites you visited or in which network or city you are, … But this breaks lots of websites nowadays. While this approach might be easy it is usable for browsers only and far from being “secure”.
  2. If you use the tsocks/torify approach which allows non SOCKS aware applications (e.g telnet, ssh, ftp etc) to use SOCKS without any modification, you can use most applications. But they might still leak information about the local system themselves. Besides there is the risk of just forgetting to type the “torify” in front of the command that should be executed. Which is definitely not what one wants to happen. So this approach is neither “easy” nor “secure”.
  3. The VM approach I already wrote about in an article earlier, puts the software you are using on the internet into an virtual machine (VM) which reduces the risk to leak information about you and the information within the VM. The drawback is that you have to configure a redirection with a packet filter or firewall on your host system and that you have to set up and configure a VM to use as an anonymous workstation. So this approach is still far from being “easy”.

Which is why I want to discuss a new approach that is at least as secure as the last one above (#3) but additionally should be quite easy to use:

  1. Install and start Virtualbox (at least version 4).
  2. Download two VM images: Tor gateway and Tor workstation
  3. Import the images (in Virtualbox File->Import Appliance)

To start using the internet anonymously you just have to start both VMs Tor gateway VM and Tor workstation VM. As soon as they finished booting, you can use the anonymous internet access through the Tor workstation. If you want to stop using the internet anonymously, just power down both VMs. The task of routing traffic through the Tor network has been moved to the Tor gateway VM. So you do not have to modify your local system any more then installing Virtualbox and importing both VMs. You do have a preconfigured Tor workstation ready to use that boots within a minute and you can be sure to anonymously use the internet. The Tor gateway runs OpenWRT Linux using just about 8Mb of disk space and 32Mb of RAM. It boots in less then 3 seconds and transparently routes all traffic generated within the Tor gateway itself and every traffic coming on the virtual internal interface “tor” through the Tor network. You do not need to do anything but start when you want to use Tor and stop the VM when you finished. The Tor workstation runs Micro Core Linux using about 120Mb of disk space and 192Mb of RAM. It boots in less then a minute and has some browsers (Firefox, Chromium and Opera) and a terminal installed. It only stores information within a session. So if you shut it down and boot it again it does not have any information about the previous session. Of course you are not forced to use the Tor workstation. You can use any other VM (Linux, Windows, AmigaOS, just any TCP/IP capable Operating System). Just configure the network settings of the VM (in Virtualbox Settings->Network->Adapter attached to internal network “tor”). Please report, if you encounter any unwanted behavior or find any problems! Also do so if you have got any suggestions to improve the VMs or this approach as a whole. Side note: The content of the communication between you (Tor workstation VM) and any receiver (e.g. a website) is necessarily only encrypted within the Tor network. So if you open an unencrypted connection to any receiver the Tor exit node which in fact opens the connection to the receiver is able to see the content of the connection. So do not send any sensible information like passwords over unencrypted connections!

Information for developers

There is a git repository available for building the Tor gateway image from scratch. Feedback and patches are welcome.


To use the fast gateway you need to change the internal network of workstation VM to “torfast”.

This entry was posted by ra on May 29, 2011 at 7:42pm. It is filed under English, Firefox, Linux, Security, Web. You can follow any comments to this entry through the RSS 2.0 feed.

Feel free to read the comments, or leave one of your own!

Also, if you're feeling social, you can Digg this, add it to del.icio.us, add it to Technorati, or add it to Newsvine!

Sites that reference this post:
  1. Ativismo na Internet - Stormfront

Comments for “Easy and secure anonymous internet usage”

  1. wah Said:


    thanks for this awesome tip, but your both VM’s seem corrupted?

    ra Reply:

    Please be more precise about the occuring error. Is similar to the one Rudy posted below?

  2. Rudy Said:

    Importing the VMs with VBox 4.0.4 failed. It seems that you renamed *.ova after exporting them. Google was my friend.

    $ tar tvf ‘Tor gateway 0.3.2.ova’
    -rw——- someone/someone 11161 2011-05-21 13:22 Tor gateway. 0.3.2.ovf
    -rw——- someone/someone 4575744 2011-05-21 13:22 Tor gateway. 0.3.2-disk1.vmdk
    $ cp ‘Tor gateway 0.3.2.ova’ ‘Tor gateway. 0.3.2.ova’
    $ tar tvf ‘Tor workstation 0.1.1.ova’
    -rw——- someone/someone 12868 2011-05-22 21:41 Tor workstation 0.0.2.ovf
    -rw——- someone/someone 105152512 2011-05-22 21:42 Tor workstation 0.0.2-disk1.vmdk
    $ cp ‘Tor workstation 0.1.1.ova’ ‘Tor workstation 0.0.2.ova’

    And hey, this is great stuff you’ve done! You’re a hero!

    ra Reply:

    You are right indeed. I fixed this in Tor gateway 0.3.3 and Tor workstation 0.1.2. Thank you!

  3. Da Said:


    Trying out your Virtual Box Tor images, this is very nice work and if this is really a more secure way to use Tor then the actual Tor methods, then I hope you will really continue this project for a very long time, since this is going to be very beneficial to people…

    For the bad, the first time I started to use this, I come to your site here and Firefox locks up while trying to load the site, from what I can tell it was having a hard time trying to load the You Tube videos..

    So there’s no need to run any Firefox addons, https everywhere, noscript, better privacy, etc.?

    Also I hope in a future version you can please make it with at least one gtk theme so Firefox doesn’t give us Linux geeks the feeling like we’re using Linux from 10 years ago, hehe… :)

    Clicking on the terminal icon on the desktop always opens it under this path below which seems a bit odd;


    Clicking in the menu, Set Time and Top don’t do anything…

    If this is geared to the average user maybe you should strip it down further. Is there really a need for all these to be on the menu? I don’t mean that you will uninstall these, because I’m sure the system is dependent on many of these, but maybe good to just remove them from the menu…

    search for files and folders
    gtk2 mixer (maybe ok for people wanting to adjust sound)
    apps audit
    control panel
    mount tool

    I’m a Linux geek myself and I don’t even know what some of these are, but then I haven’t used this distro either…

    Opera forget it, throw it out, Firefox and Chrome are better browsers…

    The majority of browser users around the world use Firefox or Chrome…

    Can we add more ram, running as low as it is, VB complains about it being to low to run in Full Screen…

    Also anytime we want to restart Tor because we have a bad connection, it’s to slow, we have to restart the Gateway? Maybe in the future you will be able to make a way for end-users to restart Tor from within the Workstation…

    I look forward to many many many more versions to come!

    Keep up the good work the world of Privacy needs you!

    One last thought, if this is really what you say it is, have you taken your ideas and method to Tor? Maybe they will help and support this to bring something better to Tor?


    ra Reply:

    This site is really very slow. Most of the waiting time is due to the use of the flattr plugin. I reduced the number of frontpage articles, so it should load significantly faster, but it is still slow compared to other sites. I will move this project to another site, when it is used by more people – so it is possible to write documentation, changelogs, etc.

    There is no need to run Firefox addons like noscript or better privacy because the impact of scripts executed within the virtual machine is minimal since it does only contain information about the current session. The Better privacy deletes so called flash cookies (local shared objects). Since the workstation does not store any information beyond the session, the Better privacy addon is not needed either. However the https everywhere addon makes sense, since Tor does nothing about end to end encryption. It just ensures encryption within the Tor network but not from the exit node to the destination.

    Regarding your Tor workstation feedback: Thank you very much! I will include your improvements in the next version.

    Regarding slow Tor connections: I got a working, but not yet releaseable Tor patch which reduces anonymity in favor of speed. If you want to use Tor fast, you just have to start a the Tor fast gateway VM.

    ra Reply:

    I just uploaded Tor workstation 0.1.3 which includes the following changes:
    -) assigned memory increased to 256MB
    -) removed unneeded menu items
    -) gtk2 theme added
    -) virtualbox share enabled (will be automounted if a valid path is set in the settings. just leave the name to “tor_share”)

  4. Rudy Said:

    Ra said:

    “Regarding slow Tor connections: I got a working, but not yet releaseable Tor patch which reduces anonymity in favor of speed. If you want to use Tor fast, you just have to start a the Tor fast gateway VM.”

    How does the patch do that? Does it relax circuit restrictions?

    Perhaps it’s a Tor sin, and I’ve been experimenting with running multiple gateway VMs, each feeding its own VBox internal network. My workstation VM has multiple NICs, each connected to one of the internal networks, which are bonded using ifenslave.

    I get marginally more throughput, especially with mode 2. However, over 90% of traffic uses eth0, no matter what I do. That presumably reflects Tor’s design: building circuits and using them for 10 minutes or whatever.

    Could the client settings on the gateway VMs be tweaked so that ifenslave could balance load across multiple NICs? And BTW, I’m on a relatively slow aDSL connection (5Mbps/640Kbps).

    ra Reply:

    Interesting idea to use bonding.. I didnt try it myself, but I think it will not work as intended, because the limiting factor is the TCP-connection over Tor. It would not necessarily increase throughput nor bandwith if you open multiple connections. But I might be wrong here.

    This is what I am currently playing around:
    Tor lets you explicitly choose entry and exit nodes. So I generate a list out of the available nodes and only choose the fast ones (Fast as in high bandwidth and low latency). Currently I just ping the hosts and compare the RTT values. The available bandwith is taken from the Tor nodes list. Then I have two different ways: One needs a patch for Tor which also lets you choose the middle node. The other just reduces the number of nodes in the circuit to 2.
    From my testings the RTT added by using TOR can be reduced to ~150ms and the maximal available bandwidth is about 25MBits/s. But of course your anonymity is reduced and – probably more important – if many people start using it there will be a inhomogeneity in the Tor node usage over all, which would reduce the anonymity of the Tor network in total. Anyways there should be a version for public testing available soon.

    ra Reply:

    The first public Tor fast gateway version is now online.

  5. Da Said:


    Yeah looks like you have to untar these to get at the real images inside, might want to take out the Tor gateway. 0.3.2.ovf and Tor gateway. 0.3.2-disk1.vmdk out of the two .ova files…

    About the Gateway, might be a good idea to add in a ’shutdown’ command so it can be shutdown properly, so it doesn’t end up with any corruption problems, if this can happen by just closing the VM window…

    Tor Project told me they are supporting Tails, LOL, might want to see about getting some support too, especially if you believe you have a better idea…

    Also can the memory be increased in the workstation, it complains when you want to run it full screen with this low of memory… By the way why is the memory so low, most system today average around 2GB-4GB…


    ra Reply:

    As far as I understand it, the purpose of .ova is to ship just a single (tar) file which includes the disk image(s) and the .ovf file. The only reason I see to ship the .ovf and disk image is backward compatibility. But I think it’s ok to require VirtualBox >= 4.0.

    I wanted to add a shutdown command to the gateway but it is not necessary in my opinion, because there is only data written to the hard disk if one does this manually. During normal use every data should be written to the RAM-disk only.

    Ad Tails: Both projects are similar in terms of that it is ensured that data sent over the network is going through the Tor network. Tails works within a chroot on Linux, so there is no virtualization overhead, but only Linux is supported and it does nothing to prevent the host from leaking information. The approach here, which btw has no name yet (suggestions are welcome), works with any TCP-capable operating system as workstation and, if you use the Tor workstation or any other well configured system, does not leak information from the host system.

    I will try to get this to a broader audience, as soon as the children’s diseases are gone.

    The RAM of the workstation will be increased in the next version. It is that low intentionally to make it also work on fairly low RAM systems but obviously still has to be increased a bit. (:

  6. anewerauser Said:

    Thanks a lot mr RA
    Your work is very good.
    It worked as advertised.
    I think the gateway VM is similar to some extent to JANUSVM Virtual appliance.
    I tested your project ,both the gateway and the workstation.it Worked like a charm.
    i even used a new windows xp workstationan and it worked ok.
    But i have a couple of questions:
    Can i use TOR Browser Bundle inside the workstaion,so i will actually get a circuit of 6 nodes,instead of 3 only?
    That is,the Gateway gives 3 nodes and “TOR Browser Bundle” give other 3 nodes.
    Does this approach will increase the anonymity level?or it will be useless?
    For example suppose that 3 nodes of the tor inside the gateway vm were compromised,will the other 3 nodes of tor browser bundle protect the anonymity ?In other words will the last [third]node of the tor circuit built by TOR inside the gateway see and know my real ip [given that they are compromised] or they will just see and know a stream or packets of a new request for a new circuit ?
    i hope i had managed to explain my point of view?
    Thanks a lot again for your work.

    ra Reply:

    Glad it works for you! (:

    You are right, to a certain degree one could compare it to JanusVM.

    If you use the Tor browser bundle inside the workstation, you end up having a Tor circuit within a Tor circuit – so 6 nodes, as you wrote. As you have more nodes then you increase anonymity a little bit at best, but from my point of view it is not worth the overhead. If the entry and the exit nodes are compromised, they can track down the connection back to you by timing analysis. If you are worried about that, you should not rely on Tor only. BTW You can configure the Tor client itself to use more nodes in a circuit.

  7. Da Said:

    Hi Ra,

    Thanks for the changes…

    I made a post a little while ago, not sure if something happened to it, so I’m posting this again.

    I hope you’ll please get listed with the Tor projects listed on their site;


    Your work is very good and you deserve it!

    I found one problem when starting the workstation it complaining about shared folder. Please look at the screen shot below;



    ra Reply:

    Shared folder error message is fixed in Tor workstation 0.1.4

    I will try to get this project listed as soon as:
    -) it is “ready” (as you noticed there are still some annoying errors)
    -) it has a name (:

  8. Da Said:

    Hi Ra,

    I tried to switch to full screen and it complained there is not enough guest memory.

    Please see screen shot below;



    ra Reply:

    Fixed in Tor workstation 0.1.4

    Thank you!

  9. Da Said:

    Hi Ra,

    Hos I/O Cache problem for Linux with ext4, see screenshot below;


    I enabled this option by the way…


    ra Reply:

    Fixed in Tor gateway 0.3.4
    Thank you!

  10. Da Said:

    Hi Ra,

    SORRY for all the posts, so PLEASE take them and put them in one post and next time I will run for a long time, testing then just make one post…

    Ok so now I start the workstation and I have the ‘Hardware clock in UTC time’ unchecked in the VB settings. But when the workstation starts it says it’s setting the time to UTC.

    Here’s a screen shot;

    Also when I started the workstation I get some mount error and something about mounting tor_share, please see screen shot below;


    Ra can I please make request? For me 24 hour time is for the military hehe, so can you please make it 12hr time with am pm next to time?

    THANKS Ra keep up good work, looking nice. :)

    ra Reply:

    The mount error has been fixed in Tor workstation 0.1.4. Also the clock is now in 12hr format.

    I am not sure how to fix the time zone issue yet.

    ra Reply:

    Tor workstation 0.1.6 now uses localtime. Besides it has bash as default shell and chinese language support.

  11. Da Said:

    Hi Ra,

    I’m running Slackware 13.37 x86 and I compiled VirtualBox_OSE 4.0.8

    When the workstation starts the taskbar never shows up until I play with the VB window, dragging it around resizing it.

    Here it is when I first get on the desktop no taskbar;


    When I try and resize the window with the minimize/maximize buttons on VB the background doesn’t resize and whatever background there is, either a solid color or wallpaper it get’s split;


    The screen is split in this screen shot also the taskbar gets out of place too;



  12. Da Said:

    Hi Ra,

    I’m running Slackware 13.37 x86 and I compiled VirtualBox_OSE 4.0.8

    When the workstation starts the taskbar never shows up until I play with the VB window, dragging it around resizing it.

    Here it is when I first get on the desktop no taskbar;


    When I try and resize the window with the minimize/maximize buttons on VB the background doesn’t resize and whatever background there is, either a solid color or wallpaper it get’s split;


    The screen is split in this screen shot also the taskbar gets out of place too;



    ra Reply:

    I think it is some kind of LXDE bug. I am not yet sure how to fix this but I will look into it.

  13. anewerauser Said:

    Thanks In Advanced

    failed to import appliance

    Tor Workstation 0.1.3.ovf
    “shared folder path ‘/tmp/to_share” is not absolute.

    ra Reply:

    Should be fixed in Tor workstation 0.1.4

  14. anewerauser Said:

    Hi Mr RA
    Thanks again for your hard work.
    I tested your latest Tor workstation 0.1.4 and it is as usual ok ok.
    but there is one problem related to my character encoding:
    I can NOT read any page whose language is Arabic>
    Can you please tell me how to make “Tor workstation 0.1.4″ read Arabic character ,that is in both firefox and in any text?
    Sorry to trouble you.

    ra Reply:

    Should be fixed in Tor workstation 0.1.5. Thanks for reporting!

  15. anewerauser Said:

    please mr RA
    where is appbrowser?
    i want it so i can download any needed programe.
    thanks in advance.

    ra Reply:

    Start a terminal and type “ab” (for AppBrowser).

    ra Reply:

    And please let me know which programs you miss. They might be usable for others too, so worth adding.

  16. anewerauser Said:

    Hi Mr RA
    Thanks again for your premium piece of work.
    I tested your latest release of Tor workstation 0.1.5 and it is working well.
    I can now read the Arabic text in firefox.Thanks for this addition.
    However,could you please tell me how I can write text in Arabic,for example ,how i can write a post in Arabic in any forum or any text document.
    How can I switch the keyboard between Arabic and English?
    I can do that in Windows by hot key combination ALT SHIFT.
    Sorry for frequently asking you annoying questions.
    Thanks in advance.

    ra Reply:

    There should definetely be a graphical keyboard layout switch. Might make it to the next version. (:

  17. anewerauser Said:

    Hi Sir

    Thanks for your great project.

    I just need your help in one problem:

    How can I update TOR files in JanusVM.

    I know how to mount the virtual disk and access it for reading and writing.

    I just want you to kindly help me how to get the updated TOR Files [linux version of course] and where to put them in JanusVM virtual disk[which paths and directories].

    Sorry I am not a linux user so I need your help.

    Thanks in advance.

    ra Reply:

    Mounting the VMDK file depends on the OS you are using. You should be able to find a solution by searching for “(Linux|Windows|MacOS) mount vmdk”.
    Tor configuration files are usually in /etc/tor (and state files in /var/lib/tor).

  18. anewerauser Said:

    Hi Mr RA
    Your effort is highly appreciated.
    You may issue a change log for every release.
    Also You may make a Command line Console in the TOR gateway to include:
    -build a new circuit
    -turn on tor
    -restart TOR

    Thanks a lot.

    ra Reply:

    I will publish a changelog with the next release.

    Controlling Tor through command line is already possible through the control port. This will be used in the Tor fast gateway to build two hop circuits.

  19. anewerauser Said:

    –[This will be used in the Tor fast gateway to build two hop circuits]–

    Can you explain in more detail,please?
    Is it 3 nodes or 2 nodes?
    How can i build a new circuit?

    ra Reply:

    See EXTENDCIRCUIT in https://gitweb.torproject.org/torspec.git/blob/HEAD:/control-spec.txt

    There are libraries for Java and Python available, jtorctl and pytorctl.

  20. anewerauser Said:

    Hi Mr Ra

    1-Please tell me how many nodes in a circuit in your TOR GATEWAY.
    It should not be less than 3 nodes.
    Make the 3 nodes default,and put option to change it with command line on the console and tell us what is this command.
    2-Another point is :Make the eth0 interface of the Gateway Bridged-network not NAT,so we are sure that it is separate on the LAN [this last point can be achieved by changing the settings of the virtual machine of the virtual box].
    3-As for the TOR workstation,You can look at the TAILS LIVE CD which is a good Debian based live cd made specifically for the anonymous surfing.
    Thanks for your attention.

  21. anewerauser Said:

    Please Mr Ra
    How many nodes are there in your TOR GATEWAY?
    I want to make sure that it is at least 3 nodes.
    I am waiting for your answer.

    ra Reply:

    The Tor gateway uses the default Tor client circuit creation. Which are three hops default and there might be four in case of a hidden service connection for the rendevous point and two if there are not enough acceptable routers. This is the default Tor client behaviour.

  22. checkitout Said:

    Hi Checked this out. A very nice solution. But I did have a look at what the Gateway actually does :-)

    The first connection is ALWAYS:

    wants to connect to on UDP port 53 (domain)

    IP Address:
    Reverse DNS Name: anonymisierungsdienst.foebud.org

    Sooner or later always this comes up:

    VirtualBoxVM wants to connect to on TCP port 9101 (bacula-dir)

    IP Address:
    Reverse DNS Name: belegost.csail.mit.edu

    CAN YOU PLEASE EXPLAIN this. It seems to be kind of a security hole always connecting the foebud first. Do you LOG this???

    ra Reply:

    Thanks for giving the VM a more in depth testing! (:

    The DNS connection to (which is just the first server listed in /etc/resolv.conf) you see in first place is needed for resolving the names of one of the NTP servers listed in /etc/config/system. Correct time is needed by the Tor client to work.

    All other connections run through the Tor network (as you noticed is a Tor node).

    A better solution would be to use the VirtualBox host->guest time synchronization but this would need building the VirtualBox kernel modules for OpenWRT which is still on the TODO-list.

  23. Da Said:


    Still all the same problems as the older version, to little memory, can’t run it in full screen without the screen tearing or the taskbar appearing in the wrong place…

    Also can you consider making something so people can stop and start Tor, otherwise I guess for the moment the only thing you can do is close and restart the browser…


    ra Reply:

    I consider the Tor workstation as proof of concept only, because it is not really nice to use in its current state. I hope I can post some ideas on how to improve the situation within the next days.

    ra Reply:

    Unfortunately it will take longer than a few days. ):

  24. mirimir Said:

    Is it possible to edit torrc in Tor fast gateway to point to hidden service on another VM? My attemts have failed. Edits don’t persist, but missing inode errors do. I suspect that you’ve left no wasted space in the filesystem. Or used some other Linux magic. Thanks.

  25. mirimir Said:

    Edit: OK, I get it. It seems that killing VM after making changes corrupts ext2 filesystem. If I halt before killing, changes persist and I don’t see inode errors. Thanks.

    ra Reply:

    This is the second time I hear about ext2 fs corruption. Is there a way I can reproduce this problem?

    ra Reply:

    Maybe adding the “sync” mount option could fix this..

  26. mirimir Said:

    I get ext2 errors whenever I make any file changes in the Tor gateway and then kill the VM without first halting. I gather that ext2 is very easy to corrupt because it doesn’t journal. I have some questions that I’d rather not post in public. Please email me.

  27. mirimir Said:

    OK, I get it. I have Ubuntu VM [] running thttpd. In Tor fast gateway VM [] I edit torrc to enable hidden service, and point to Ubuntu VM [HiddenServicePort 80]. And it works. Now I need to redo it using SSH port forward.

    For my risk model, I need Tor gateway with LUKS-crypto. I see that it’s been ported to OpenWRT. Have you used it?

    ra Reply:

    No, not on OpenWRT.

  28. Bern Said:

    Would a http server in “Tor workspace” work if I configure the “torrc” file? (https://www.torproject.org/docs/tor-hidden-service.html.en#two)

    ra Reply:

    What do you mean by “Tor workspace”? The Tor client runs in the Tor [fast] gateway where you can configure a hidden service to redirect the traffic to a http server.

  29. Bern Said:

    There are 2 VMs running, “Tor workspace” and “Tor gateway”. Can the HTTP server be at “Tor workspace” VM? Or it must be at “Tor gateway”?

    ra Reply:

    What you call “Tor workspace” I called “Tor workstation”, but honestly I think that your term is more appropriate.

    The hidden service must be configured at the Tor gateway, but the service itself like HTTP may run on any machine on a reachable network. The gateway just does the TCP redirection. So it may also run on the Tor workspace.

  30. Skeptikal Hippo Said:

    I’m trying to install Tor Workstation 0.1.6 using VB 4.1.6 (OS X Lion) and I’m getting the error “Could not create the clone medium ‘~/VirtualBox VMs/Tor Workstation/Tor workstation 0.1.6 disk1.vmdk’ (VERR_GENERAL_FAILURE)


    Result Code:
    VBOX_E_FILE_ERROR (0×80BB0004)
    Component: Appliance
    Interface: IAppliance {Hex String}

    Tor Gateway 0.3.5 installed with no problems.
    Any ideas?

    ra Reply:

    Can you get a more verbose error message (from a detailed output or log file)?

    I did a fsck of the virtual disk and exported the VM – maybe this works for you: http://pluto.fsinf.at/~ra/Tor workstation 0.1.7-test1.ova

  31. Skeptikal Hippo Said:

    Thank you so much for responding so quickly! I tried your new .ova file and it still didn’t work. I read that sometimes the files get corrupted. So I tried downloading the file with Chrome. File imported with no problem! It must have gotten corrupted on my end somehow. Thanks again for all the work you have done!

  32. anewerauser Said:

    Thanks a lot mr RA
    Your work is very good.
    But,can you please update Tor Gateway to include the latest TOR update?
    Thanks in advance.

  33. anewerauser Said:

    Hi Mr Ra
    Please I want to know how to update the TOR program in the TORGATEWAY.
    You know it is very important to have the latest version of TOR.
    Thanks in advance.

    ra Reply:

    This is the latest Tor version available in OpenWRT 10.03 is OpenWRT 10.03.1 has been released about a week ago and ships Tor So the gateway should be upgraded to the newer OpenWRT version.

  34. Lii Said:

    Is this project still being actively developed?

    From what I can see these versions have not changed in a long time?


    ra Reply:

    Yes, the project is definitely active. The last release was not even two months ago..?

  35. Das Said:


    How can we use our own VM, after setting the internal network to Tor, then when we start our VM and it’s running on the Tor network, connect to a VPN so that VPN is now going over Tor?


    ra Reply:

    It’s exactly as you wrote. Configure your VM to use a single network interface (internal network “tor”), start the Tor gateway and your VM. All of the traffic generated by your VM is transparently routed through Tor. So if you connect to a VPN, also this connection goes through Tor (as long as it’s a TCP connection, UDP will be dropped).

  36. Da Said:

    Hi Ra,

    Ok nice to hear and see it’s still being actively developed, sorry I haven’t been paying attention to it in a while, my bad it’s Da, same as Das too making the post… :)

    Ra could you PLEASE be so kind as to either point me where I can read, or can you PLEASE tell me how I can setup Tor so that it works on the network level like you did in the Gateway, so that anything going online is routed over Tor?

    I want to be able to route, connect to a VPN also going over Tor like this and I would really appreciate help for installing Tor and doing this?


    ra Reply:

    Take a look at the files /etc/iptables.conf, /etc/tor/torrc, /etc/dhcpd.conf and /etc/config/network in the Tor gateway.

  37. Da Said:

    Hi Ra,

    Thanks for the FAST reply, ok I understand for your Gateway image you make.

    But if someone wants to install Tor on their computer running Linux, or on their own Linux guest, install Tor, how can we set this up so Tor runs over the network the same?

    Please don’t misunderstand me, THANK YOU very much for your work, this is really great, it’s just that I’d like to learn how to do this and install Tor on my own computer and have everything going over Tor.

    So can you please teach me how I can do this?

    I’m a pretty good Linux geek of 10 years, I’m sure if you help me I can do this too.


    ra Reply:

    The gateway has two network interfaces (eth0 where traffic is routed to the internet and eth1 which is an internal-only network). All incoming tcp traffic on eth1 is redirected with iptables through the tor socks interface, incoming udp traffic with destination port 53 (dns) is also redirection through tor. Any other traffic is discarded. All locally generated traffic is also redirected through tor but the traffic generated by the tor user-id.

  38. mirimir Said:

    I’ve been discussing VPN via Tor with Das on Wilders. Thanks to your quick reply, I was moved to try it again, using your Tor fast gateway, and pfSense VMs for VPN connections. It worked — VPN3->[Tor->(VPN2->VPN1)]. Details are at http://tinyurl.com/7lxt8tq

    ra Reply:

    Interesting. Thanks!

  39. Da Said:

    Hi Ra,

    Actually when you have some time, do you think you could PLEASE put up a tutorial that shows how you created the Gateway?

    I’d greatly apprecaite this! :)


    ra Reply:

    I plan to set up a public GIT repository which would make it easier to implement changes and automatically build the Tor gateway images. This should also make it more clear on how the Tor gateway works. But before I have to decide if OpenWRT is really the right distribution for that task.

  40. jex Said:

    Hi RA,
    I’m browsing your site with tor browser (with certificate patrol) through an open VPN service,I’ve noticed that the browser is accepting and saving a certificate from gravatar.com every time, what could that be?

    ra Reply:

    I think was introduced by a Wordpress-Plugin[0] which I had activated for this blog. gravatar is now disabled.

    [0] http://blog.2i2j.com/plugins/wordpress-thread-comment

  41. Jinsu Said:

    Excellent initiative on your part Ra, it’s very easy to use. Can you please post how it’s possible to configure the tor gateway to utilize bridges instead of connecting directly to the network? Some state wide firewalls are designed to block access to the tor network directly so this would be essential in providing activists with a way to reach the outside while achieving higher anonymity than just using tor on its own.

    Another idea I have is, would it be possible for you to design an I2P gateway vm? This is an alternative anonymizer project that enjoys much faster connection speeds and lower latency than tor due to the way they are designed.

    ra Reply:

    To manually configure the Tor gateway to use bridges:
    -) Boot the Tor gateway VM
    -) Press enter to activate a shell
    -) Add (for example)
    to /etc/tor/torrc (to get other bridges visit https://bridges.torproject.org/)
    -) Execute /etc/init.d/tor stop && /etc/init.d/tor start

    At the moment I have no idea on how to configure that one automatically. Any ideas welcome.

    AFAIK Tor and I2P are fundamentally different as I2P is a standalone anonymousing network on top of IP whereas Tor anonymouses internet traffic.

  42. Markus Said:

    hi Ra, any chance that you could collaborate directly with the TorProject? Your implementation is far superior than their TorVM concept model. An advantage of working with them is that they will be more active at maintaining it.

    ra Reply:

    Thanks for the feedback. I really appreciate it!
    I will work hard in the next days to get this project in a decent shape to become an official Tor project.

  43. Anonymous Said:

    That’d be great. Offical Tor project would be superiour!

    ra Reply:

    See above. Thank you for the feedback!

  44. Da Said:

    Hi Ra,

    Glad to see this site is still alive, but I’ve spent 2 weeks trying to get it to work, it seems that this blog is always down.

    So you might consider getting another site or host, there are many great sites out there you can use for Free too!

    If you don’t have a good running site that has very little down time, which should really be 99.9% up, then it makes the project look bad and it seems like every time I want to come to this blog since you’ve been running it, it’s down.

    Keep up the great work, this really needs to be on the Tor Project! :)

    ra Reply:

    You are totally right.
    Unfortunately the server hosting this blog had some stability problems. I am about to move the blog to another server but it will take some time.

  45. Anonymous Said:

    Do it yourself instructions are online.

    Let’s cooperate.

  46. Anonymous Said:

    This will be very much appreciated. Thank you Ra. This will expose your project to the masses where I’m sure many people will benefit from your contribution and also add to it.

    I would like to say that with your Fast Tor Gateway, I can achieve excellent bandwidth speeds, ones exactly equal to those under a normal setup directly from my ISP. Now I could really use the internet while Torrified, a far contrast with the typical dismal speeds of the TBB.

    ra Reply:

    Great to hear that the fast gateway works well for you, since it is pretty much a proof of concept! (:

  47. Da Said:

    I hope we can get an update to the Gateway it’s using a much older version of Tor… :(

    Also what about a transparent proxy?


    ra Reply:

    Which kind of transparent proxy do you think of?

  48. Anonymous Said:

    How to contact you directly? E-Mail?

    ra Reply:

    email: r_a@lavabit.com

  49. Da Said:

    I thought the Bridges are only a means for people to connect to Tor, where in countries they are being blocked access;


    I never heard of anything where this is also a preferable method to get online instead of connecting directly and gain anything from it, or higher anonymity…

  50. Bizi Said:

    Is the Tor gateway still safe to use, 0.3.5.ova since this is an older version of Tor?

    Also why the need for a firewall/iptables rules if someone already has a firewall on their box, isn’t that a bit redundant?

    Thank you…

    ra Reply:

    The current stable Tor version is The Tor version included in the Tor gateway is which is not totally up to date. See the Changelog[0] for a list of changes between that two versions. I did not have the time yet to release an update to the gateway with Tor version, because I am focusing on releasing source code scripts to the whole project. That should make it easier for others to contribute.

    On the gateway iptables is only used for the traffic redirection and filtering any kind of traffic but TCP/IPv4.

    ra Reply:

    Tor gateway 0.5.0 now includes Tor and it should not be that hard to update it to Tor 0.2.2.x or even Tor 0.2.3.x-alpha.

  51. Da Said:

    Sorry I don’t know much about the transparent proxy, just something I heard was needed is all…

    Well, look forward to some new updates!

    Keep up the great work!

  52. Da Said:

    I’m lost here, if the current stable is, why did you install


    ra Reply:

    Because is the latest in the current stable release of OpenWRT. They also provide but I *think* it makes little difference since both are not up to date. Updating the Tor package is definetely the next thing on the list. Keeping it up to date with minimal effort is now possible due to the source build scripts.

  53. Anonymous Said:

    Hello, just wanted to repost an idea since it didn’t come thru. I was suggesting that you experiment with a minimal install of freebsd as the base for your tor gateway vm. The *bsd family seems to be well regarded in terms of their security and stability comapred to anything else. Resource usage is even lighter. In your opinion, would this make the gateway more secure and resistant to compromise in the event that the workstation vm gets hosed?

    ra Reply:

    Although one could of course try to argument regarding security and stability in one or another direction it is pretty much a question of personal preference in my opinion. Though I have some experience with OpenBSD and FreeBSD I am much more familiar with Linux, so I prefer to use it.

  54. Da Said:

    So there’s going to be a script we run inside the gateway at the terminal, as example; sh update-tor and then this is going to automatically update the tor version inside the vm gateway?

    THANKS ra! :)

    ra Reply:

    It would be possible to set up a external OpenWRT repository to update the Tor package within the gateway. But I am not sure yet if this would really make sense. What I meant is to not depend on the Tor version shipped with OpenWRT and instead build an up to date Tor package that is included in the OVA-file.

  55. Da Said:

    Sorry I was talking about the OVA, so we can update tor inside it now at the terminal?

    I haven’t installed this yet, is information listed in the term now how to do this?


    ra Reply:

    No, but I put a prerelease file online which includes an up to date Tor package ( Though it didnt receive much testing yet.

  56. Maz Said:

    The pre-release version seems to be working nicely. I didn’t do any type of deep testing though, just ran it and it worked. It’s great to see that you added your project to sourceforge.

    Can you please update the Tor package for the fast gateway as well? Using the fast gateway means no more need for relying on seedy VPN services to get faster speed. Thankyou RA keep it up. Please let the Tor project know so they can link to it for activists.

    ra Reply:

    Thanks for the feedback!

    I uploaded Tor fast gateway 0.1.0 which includes an updated Tor package (

    What IMHO is needed at least before announcing the project:
    -) Move the project to another hoster (Move to github is in progress: https://github.com/ra–/Tor-gateway )
    -) update source build scripts to including Tor package building (in progress but not finished yet)

  57. Da Said:

    Hi Ra,

    Ok sorry, I guess I misread those last replies, I see this is something in the planning you want to make, so that the end-user can update it.

    Can’t wait to see that…

    So in the Tor gateway 0.5.0, Tor is safe to use?


    ra Reply:

    Tor is the currently recommended version for the 0.2.1.x branch. According to the Tor Changelog[0] includes some security fixes and I can’t find any information on the release.

    Tor gateway 0.5.1-pre includes the currently recommended version for the 0.2.2.x branch (

    [0] https://gitweb.torproject.org/tor.git/blob/HEAD:/ChangeLog

    ra Reply:

    I uploaded Tor gateway 0.5.1 which includes Tor version

  58. Da Said:

    THANKS Ra for 0.5.1…

    Keep up the GREAT WORK! :)

    ra Reply:


  59. Eli Said:

    Hi Ra, this is a re-post my message didn’t make it last time. I have a few security related suggestions/points for the Gateway.

    1- Tor is currently not taking advantage of compile time hardening like NX, ld, gcc etc. but this is expected to change in the 0.2.3.X branch. Does OpenWRT have such security features? Can you please check if this distro is a security enhanced one? So far OpenWRT seems ideal in the sense that it has a reduced attack surface and lighter footprint. Chrooting would be of little use since if Tor becomes compromised it’s already too late. The suggested measures would make any theoretical vulnerabilities in Tor harder to explioit by a lot.

    2- Should users change the default root password for the gtway vm? If so can you please post this as a suggestion in your topic?

    3- Is netfilter protecting the tor in the gtway from compromise in the event that the workstation is rooted? If that’s not the case, is there a way to firewall the gtway components from direct communication from the workstation/

    4- IMHO you should link to a light weight distro (puppy/DSL etc.) for a workstation since that will mean less effort to maintain the project. If you would still prefer to maintain the workstation then I would suggest you slim it down to one browser -not Opera :)- and enable many security features to thwart any potential attacks. Basically turning it into a super-secure micro workspace.

    5- The gateway has NAT selected by default, can you please change that to bridged? This will allow the vms to be isolated from the host in the case of an attack. Also enabling PAE/NX by default would make sense when Tor is able to support hardening.

    6- I would really like to help you test your gateway for leaks, regrettably I don’t have much Linux experience. I found a battery of suggested leaktests used in the TorBox project listed here:
    If you can tell me how i can go about running them I’ll see to it that it’s tested.

    7- The Fast Gateway is working great. I’ve read that for safer anonymity purposes, however, a minimum of 3 hops is required. Is there a way to have 3 hops but only select fast nodes above a certain threshold to be included for selection? If this ruins performance then nevermind it’s just an idea.

    Thanks for your dedication, your project is much lighter than the bloated and malfunctioning TorBOX that they have. Their gateway alone is a crazy 300mb in size! Too much bloat :S

    PS: I’m communicating anonymously using disposable mail to prevent authority eavesdropping so please post your replies here as this is the only for me to know your opinions on this.

    ra Reply:

    Thanks for your valuable feedback!

    ad 1) OpenWRT does not provide any explicit hardening features AFAIK. It would be a nice-to-have feature but there are hardly any Linux distributions that fulfill the requirements – which reminds me that I should write them down explicitly (https://github.com/ra–/Tor-gateway/wiki/Todo)

    ad 2) The default root password is empty and IMHO there is no need to define one, because one gets a root-shell on the console in VirtualBox only and there is no network service like ssh or telnet running. I can’t see a way where one of the two daemons (dhcpd and tor) could elevate their privileges. But if anyone comes up with an explaination why defining a root password would be a good thing to do, I will definitely add it to the FAQ (https://github.com/ra–/Tor-gateway/wiki/Faq).

    ad 3) Netfilter protects the gateway from other VMs in a way that it doesn’t allow any direct connections but on UDP port 67 (for DHCP).

    ad 4) There is a lot of work to do on the Tor workstation. Currently it is in a proof-of-concept state at best. The main problem unresolved yet is to find a distribution (like Tiny Core Linux) or setup (like a Live-CD) that guarantees that there is no data written to disk permanently and at the same time stays maintainable. I speculate on moving that feature to VirtualBox but it is currently not possible to export a VM and have a virtual disk be immutable.

    ad 5) When using a NAT the user does not have to configure anything. When using a bridge the user has to define a local network device. Nevertheless the bridge configuration should probably go into a FAQ. I am currently moving the project to github andwrite up documentation. https://github.com/ra–/Tor-gateway/wiki

    PAE/NX will probably make sense to use in the future.

    ad 6) I did the leak testing as follows:
    -) Prepare the Tor gateway to make it easier to test by adding
    ReachableORAddresses *:443
    to /etc/tor/torrc
    -) Make VirtualBox capture all packets of the Tor gateway:
    VBoxManage modifyvm “Tor gateway 0.5.1″ –nictrace1 on –nictracefile1 /tmp/torgw.pcap
    -) Generate traffic on any Tor workstation or the Tor gateway itself.
    -) Analyze the pcap file with Wireshark
    wireshark -R ‘!(tcp.port == 443)’ /tmp/torgw.pcap

    There should only be some DHCP and ARP packets between the Tor gateway VM and VirtualBox on the VM host visible.

    If you do your own leak testing, please let me know about the results.

    ad 7) The Tor fast gateway currently also is a proof-of-concept only but it seems to be fairly usable – even at its current state. I added to the TODO-list that the number of hops should be configureable. This should be easy to add but I must say that it’s not on top of my priority list yet.

  60. Eli Said:

    Ok one more thing I forgot to add…

    There is currently a problem with Tor known as identity correlation through circuit sharing, outlined in the link below. I guess that the gateway ccould be vulnerable to this but it’s not your fault since Tor has a problem with this now. Can the Gateway vm be used by multiple vms running at the same time? Is that recommended? I was thinking f a case where mutliple identities are running at the same time in separate domains, anonymously.
    What is the likliehood that one vm could communicate/cross infect another that is behind the same gateway instance?

    Thanks again.

    ra Reply:

    Using the gateway with multiple VMs concurrently is what it is designed for. I did not check yet if this works around the circuit sharing problem though.

  61. Eli Said:

    Thanks for the reply.

    For the message directly above this one, every time I post the link, the message doesn’t register so I’ve shortened it: http://bit.ly/GACRgo

    As for a project name I’ve got a few suggestions and the philosophy behind them.

    For the gateway:
    OnionGate – Embodies the Tor mascot in it’s name.
    ShadowGate – Because its virtual and transparent to the user
    AnonymaTor – Implies that its a Tor based mechanism for anonymity.
    Titanium – Describes it best, because it’s light,fast and powerful

    For the workstation simply call it one of these: WorkBench, TinyBench, TinyStation, MicroStation; or simplyincluding one of the prefixes suggested above before the words bench/ station.

    ra Reply:

    Thanks, these are good suggestions – I added them to the wiki https://github.com/ra–/Tor-gateway/wiki/Todo

  62. Da Said:

    WOW WOW WOW for the last few replies I read on all the thoughts, goodies and todo ideas…

    Again all I can say is WOW, can’t wait to see this stuff in the near future…

    But at least maybe TitaniumTor LOL… ;)

    Cheers Ra! :)

  63. Anonymous Said:


    >your project is much lighter than the bloated and malfunctioning TorBOX

    If something isn’t working as expected please let us know at the wiki (no need to register, log in as cypherpunks, password: writecode)

    About the size see: https://trac.torproject.org/projects/tor/wiki/doc/TorBOX/Dev/ClientVM#WhyisClientVM.ovasobig

    Future Gateway.ova will be smaller.

  64. Nomen Nescio Said:

    In the Virtual Box Host Only Network, there are no DNS server specified. What are they supposed to be?


    ra Reply:

    The DNS servers are listed in /etc/resolv.conf and /etc/dhcpd.conf on the gateway.

  65. x Said:

    The “fast gateway” is dangerous!

    Of course you can whitelist which relays you want to use and go for the fast tor servers. This is how I suppose you make tor “faster”. No one should do that!

    https://trac.torproject.org/projects/tor/wiki/doc/TorFAQ#Youshouldletpeoplechoosetheirpathlength !

    https://www.torproject.org/docs/faq#ChooseEntryExit !

    Did you even read all of the tor website before you made this thing?

    ra Reply:

    I think the concept of the fast gateway is not clear enough – probably due to the lack of documentation.
    -) The first FAQ states that path lengths ==1 and >3 (or >4) should not be used. The path length of the fast gateway is currently fixed at 2. Maybe it will be configureable (to choose between a path length of 2 or 3) in the future. Of course there is a trade of between anonymity and latency.
    A path length of 2 IMHO is anonymous enough if one prefers low latency. If the entry and exit nodes you are using are evil and working together you are f*cked anyway – so the middle node makes not so much difference in terms of security.
    -) The entry/exit nodes are _not_ hardcoded/whitelisted. They are dynamically chosen. Thats why the EntryNodes and ExitNodes directives are not being used.

  66. Lauscher Said:


    Nice to find a discussion about TorBOX. I tried to test it today in VirtualBox on Ubuntu 12.04, but I got a critcal error; TorBOX tried to enable PAE, but my laptop doesn’t support PAE, so TorBOX crashed.

    I hope it is ok im writing it here, I didn’t know how to contact the developers drictly.

    Greetings, Lauscher

    ra Reply:

    I experienced the same behaviour when “testing” TorBOX – actually I could test it neither because of this error.

  67. smgl Said:

    well, irc client would be nice.

    ra Reply:

    Thanks for the feedback. An IRC client will be included in the next release.

  68. smgl Said:

    How can I change keyboard layout? Got kmaps via “ab” but “loadkmap < /usr/share/kmaps/qwertz/…" has no effect. su password necessary?

    ra Reply:

    there is no root password set. try “sudo su”. anyways changing the keyboard layout doesnt work for me neither. any hint is welcome.