How can I tunnel an entire Virtual Machine through Tor?

I have a VM which I want to allow to access the internet only through Tor. I'm using VirtualBox on OS X 10.8.

Thanks!


The Whonix Project provides a virtual machine image (.ova) which can be imported into VirtualBox. It is a Tor-Gateway, which can route the traffic of another virtual machine through Tor. You can either use the fully preconfigured Whonix-Workstation, which is based on Debian or create your own Custom-Workstation, which supports any operating system.

You didn't explicitly ask for it, but the times where you can "just route it over Tor and be happy with anonymity" are over. There are many other way to mess up, such as proxy bypass, protocol leaks and other things you should now. Therefore I recommend to read about Tor and anonymity, so you're not deluded about the level of protection you have.

Full Disclosure:
I am a maintainer of Whonix.


This procedure was designed for Linux and I tested it and used it successfully on both Ubuntu and Debian... shoudn't be too difficult to download the packages for OS X and adapt it.

http://www.howtoforge.com/how-to-set-up-a-tor-middlebox-routing-all-virtualbox-virtual-machine-traffic-over-the-tor-network