Bridged networking with virtualbox, ubuntu and static ips

This is a little howto where I explain how I configured bridged networking for virtualbox with static ips on an Ubuntu host in order to make the virtual machine accessible from outside the host system.

sudo aptitude install bridge-utils uml-utilities

sudo adduser $USER uml-net

Login again so the change takes effect.

Modify /etc/network/interfaces so it has the following content:

auto lo
iface lo inet loopback

iface eth0 inet static

auto eth0

auto tap0
iface tap0 inet manual
up ifconfig $IFACE up
down ifconfig $IFACE down
tunctl_user david

auto br0
iface br0 inet static
bridge_ports eth0 tap0

Restart networking:

sudo /etc/init.d/networking restart

Open virtualbox. Click on settings and choose network. Where it says “Attached to” select Host Interface. In the text field labeled “Interface Name” insert tap0.

Boot your guest OS and configure networking under your guest OS the same way you would configure any other machine on your local LAN.

Chapter 6, Virtual Networking, from the Virtualbox User Manual


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: