How To Set Up A TOR Middlebox Routing All VirtualBox Virtual Machine Traffic Over The TOR Network
|
Submitted by chris_dj (Contact Author) (Forums) on Mon, 2012-02-06 18:03. :: Linux | Ubuntu | Security
How To Set Up A TOR Middlebox Routing All VirtualBox Virtual Machine Traffic Over The TOR NetworkThis tutorial will show you how to reroute all traffic for a virtual machine through the Tor network to ensure anonymity. It assumes a standalone machine with a Linux OS, and VirtualBox installed. In this case, we'll be using Ubuntu on the host machine. Thanks to All commands on the host machine should be run as root (sudo or su.
Step 1 - Add A Bridge Interface For Your Virtual Machine (VM) On The Host Machine (HM)# apt-get install bridge-utils Add the following to /etc/network/interfaces: # VirtualBox NAT bridge auto vnet0 iface vnet0 inet static Start the bridge interface: # ifup vnet0
Step 2 - Setup DHCP And DNS For Clients# apt-get install dnsmasq Edit /etc/dnsmasq.conf to include: interface=vnet0 dhcp-range=172.16.0.2,172.16.0.254,1h Start the daemon: # /etc/init.d/dnsmasq restart
Step 3 - Install And Set Up TORInstall TOR - INSTUCTIONS Edit /etc/tor/torrc and add: VirtualAddrNetwork 10.192.0.0/10 AutomapHostsOnResolve 1 TransPort 9040 TransListenAddress 172.16.0.1 DNSPort 53 DNSListenAddress 172.16.0.1 Restart TOR: #/etc/init.d/tor restart Create and edit middlebox.sh on the HM: #!/bin/sh and run it: #./middlebox.sh
Step 4 - Set Up The Virtual Machine On The HMOpen VirtualBox, start the machine. Go to Devices > Network Adapter. Disable all network adapters except Adapter 1. Set the following options: Attached to: Bridged Adapter
Finally make sure your virtual machine gets its IP address via DHCP, and refresh the DHCP client/reboot the VM. It should have an IP in the range 172.16.0.n, name resolver 172.16.0.1 and gateway 172.16.0.1.
|



Recent comments
11 hours 8 min ago
16 hours 13 min ago
20 hours 37 min ago
22 hours 26 min ago
1 day 12 hours ago
1 day 12 hours ago
1 day 17 hours ago
2 days 22 min ago
2 days 1 hour ago
2 days 2 hours ago