Headline: VirtualBox host interface networking with wifi
I normally use vmware server to do alot of system testing, but this week, I'm setting up to visit my parents, and vmware decided it didn't want to work on my notebook. I'm guessing its due to vmware's rather woeful debian support, and that this is a somewhat ruft debian testing system. VirtualBox? uses NAT out of the box, meaning that I can't connect to the virtual machine from my notebook (just the reverse) so I went out looking for HOWTO's... And the best I found for my situation was the Ubuntu docoo. A small tweak later - for debian's sake, and I get the following instructions resulting in two network interfaces on the VM -eth0 NAT'ed to get out to the world, and a host-host eth1 to enable me to get from my notebook to the VM.
Install parprouted -
sudo apt-get install parprouted
-
sudo vi /etc/network/if-up.d/vbox_network
sysctl net.ipv4.ip_forward=1 VBoxTunctl -b -u $USER ifconfig tap0 up ifconfig tap0 192.168.1.1 route add -net 192.168.1.0 dev tap0 parprouted $WIFI0 tap0then make the script runnable by root
-
sudo chmod 700 /etc/network/if-up.d/vbox_network
-
sudo /etc/network/if-up.d/vbox_network
tap0 interface - in the VirtualBox? Network cfg, add a second network adaptor (eth1, of type 'Host Interface' and set it to tap0)
-
sudo vi /etc/network/interfaces
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.1.2
netmask 255.255.255.0
and restart networking on the vm -
sudo /etc/init.d/networking restart
Edit • Attach • Print version • History: r2 < r1 • Backlinks • Raw View • Raw edit • More topic actions
