linux - Trying to run Virtualbox through TOR middlebox -
i need before laptop goes through wall.
i want run virtual machine through tor middlebox. want entire vm`s connection go through tor network. (im wanting setup hidden service , needs work best)
i started looking here - http://www.howtoforge.com/how-to-set-up-a-tor-middlebox-routing-all-virtualbox-virtual-machine-traffic-over-the-tor-network
i know old figured i`d give go anyway.
for reference host machine running ubuntu 13.04 , vm running 12.04lts. on virtualbox
well have tor installed per guide, have gone though setup steps. didnt work. vm not connect net. checked ifconfig , recieving ip address, cant connection web check running through tor.
i`ve spent few hours on cant working, im @ point , click mode now. looked @ many sites, , of them point original. have tried tweaking settings, , looked @ numerous forums. cant working.
if try using tor browser bundle, refuses start tor, stating hasn`t got permission or cant listen on 172.16.0.1:53. tried using vidalia bundle tor install refuses find tor exec (not issue)
here settings trying run with...
/etc/network/interfaces
as stated in guide /etc/dnsmasq.conf
interface=vnet0 listen-address=192.168.1.1 dhcp-range=172.16.0.2,172.16.0.254,1h /etc/tor/torrc
virtualaddrnetwork 10.192.0.0/10 automaphostsonresolve 1 transport 9040 translistenaddress 172.16.0.1 translistenaddress 192.168.1.1 dnsport 53 dnslistenaddress 172.16.0.1 dnslistenaddress 192.168.1.1 middlebox.sh
#!/bin/sh # destinations don't want routed through tor non_tor="192.168.1.0/24 192.168.0.0/24" # uid tor runs tor_uid="109" # tor's transport trans_port="9040" # internal interface int_if="vnet0" iptables -f iptables -t nat -f iptables -t nat -a output -o lo -j return iptables -t nat -a output -m owner --uid-owner $tor_uid -j return iptables -t nat -a output -p udp --dport 53 -j redirect --to-ports 53 net in $non_tor; iptables -t nat -a output -d $net -j return iptables -t nat -a prerouting -i $int_if -d $net -j return done iptables -t nat -a output -p tcp --syn -j redirect --to-ports $trans_port iptables -t nat -a prerouting -i $int_if -p udp --dport 53 -j redirect --to-ports 53 iptables -a forward -i $int_if -p udp -j drop iptables -t nat -a prerouting -i $int_if -p tcp --syn -j redirect --to-ports $trans_port iptables -a output -m state --state established,related -j accept net in $non_tor 127.0.0.0/8; iptables -a output -d $net -j accept done iptables -a output -m owner --uid-owner $tor_uid -j accept iptables -a output -j reject
does article you? http://www.mike-warren.com/articles/routing-vm-traffic-through-tor.html
the short version is:
- host runs tun/tap device
- host runs vde switch (which puts packets vm tap device)
- host has iptables nat rules shovel tap device traffic tor
- host runs tor transparent proxy
- vm has static ip, connected vde switch
instead of that, run tails instead. https://tails.boum.org/
Comments
Post a Comment