I've created a bridge with two virtual interfaces attached so that I can have two Virtualbox VMs
use my network connection without using the NAT feature. I have set the network interface to HOST and
entered the vbox1/2 interfaces created below.
The commands used to create the bridge are :
Code: Select all
sudo tunctl -t vbox1 -u miket
sudo tunctl -t vbox2 -u miket
sudo brctl addbr br0
sudo ifconfig wlan0 0.0.0.0 promisc
sudo brctl addif br0 wlan0
sudo dhclient br0
sudo brctl addif br0 vbox1
sudo brctl addif br0 vbox2
sudo ifconfig br0 up
sudo ifconfig vbox1 up
sudo ifconfig vbox2 up
sudo chmod 0666 /dev/net/tun
The VMs are in the same network as the host, 192.168.1.x ...
The problem I have is that the VMs cannot get a route out to the outside world .... infact they are unable to get out of the bridge ?
The host gets out to the outside world perfectly, I can use the internet on the host without a problem, but neither of the VMs can ?
I thought since the two VMs are in the same network as the host then no NAT or Masquerading is necessary as they are just a few
IP addresses up from the host .... or have I missed something here ??
I've found a few different examples of how to achieve this on the VirtualBox forums however none of them have worked ???
EDIT:
Forgot to mention, the interfaces file for the VM is as follows :
Code: Select all
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
dns-search avanceit.co.uk
I forgot to add the brctl show O/P :
Code: Select all
# brctl show br0
bridge name bridge id STP enabled interfaces
br0 8000.001060947bda no wlan0, vbox1, vbox2
Thanks !
Mike.