Now we can create the virtual bridge, bring the real network card up in promiscuous mode, attach the real network card to the virtual bridge and then tell the virtual bridge to request an IP address with the following commands.
sudo brctl addbr br0 sudo ifconfig eth0 0.0.0.0 promisc sudo brctl addif br0 eth0 sudo dhclient br0Now you should see that the bridge has an IP address using
ifconfigYou're ready to create your virtual network card for the VM to use. To create the virtual network card (TAP interface) use the following command
sudo tunctl -t tap1 -u user_nameEach TAP interface, as you can see, is tied to a particular user. Once the TAP interface has been created, you nee to attach it to the virtual bridge and bring it up with these commands
sudo brctl addif br0 tap1 sudo ifconfig tap1 upThe only thing you have left to do now is to change the VM to use "Host Interface" instead of NAT in the network settings in the VirtualBox GUI and then put the name of the TAP interface (in our sample case tap1) in the "Interface Name" box in the GUI and your ready to start your VM.
![[logo]](logo.png)