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.
-
I want to use ubuntu – Vesal75 May 22 '16 at 15:47
-
Maybe you should try reading all the possible answers on the question. – cacahuatl May 22 '16 at 16:09
You're absolutely right about how the things should work! Here is how it's done :
- Make a dedicated network for your VM('s)
- 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)
- 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.
- Route all the traffic from 192.168.100.0/24 to 192.168.100.1 directly
- 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.