0

I want to use tor on a guest system. I'm using Ubuntu both on host and guest system. How to torify virtualbox. i want to do via virtualbox settings not in guest.

CatCoder
  • 121
  • 1
  • 3

1 Answers1

0

You're absolutely right about how the things should work! Here is how it's done :

  1. Make a dedicated network for your VM('s)
  2. Do not use DHCP on it, let your host be 192.168.100.1 and the rest of them will be 2-250, for example, keep it a single network of Class C (/24 in CIDR mask)
  3. In your host, make a dedicated DNS server and use it as a non-forwarding one : it resolves everything by itself, delegating dot-onion zone to the Tor. A Tor config must have DNSPort for it. it is done like this in ISC BIND(I highly recommend you to use it):

in Debian it's in /etc/bind/named.conf.default-zones

zone "onion" {
 type forward;
 forward only;
 forwarders {
    127.0.0.2;
 };

add it at the end **before** all-closing curly and semicolon.
  1. Route all the traffic from 192.168.100.0/24 to 192.168.100.1 directly
  2. Route all the rest of the traffic from 192.168.100.0/24 to TransPort of Tor

If you also need an extensive HS-related stuff, add VirtualMapping in tor config, and forward EVERYTHING to that destination to Tor's TransPort

I'm using IPTables, but you can use a pf for that too.

Alexey Vesnin
  • 6,385
  • 3
  • 15
  • 36