So I needed a way of running a couple test servers. Each needed to accept connections from the network including the host operating system. The connections needed to also be static for server testing. As a reminder to myself, here is a brief rundown on how to do it.

I am using VirtualBox 1.5.2 with Windows Vista (XP will work with this method as well). For the Guest I am using Ubuntu 6.06 Server. This will work with other Debian based flavors.

Host Setup

1. Create a new virtual machine.

2. Click on Network to configfure network settings for your VM

3. Add a new host interface by click the add button next to the Host Interfaces select box. Name it anything you like.

4. Change the Attached to option to Host Interface. Choose your new host interface in the Interface name option.

5. This will create a virtual interface TAP adapter in the Windows Network Connections.

6. Go to the Windows Network Connections. Highlight your main connection and the new virtual interface, right click and choose Bridge Connections.

Now all packets sent to or from the virtual interface will be routed through your main network connection. Now to set up the client.

Client Setup

1. Start the virtual machine with Ubuntu Installed

2. Set up your network interface

sudo nano /etc/network/interfaces

iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.266
gateway 192.168.0.1

3. Set up your nameservers

sudo nano /etc/resolv.conf

nameserver xx.xx.xx.xx
nameserver xx.xx.xx.xx

4. Restart the network

sudo /etc/init.d/networking restart

5. Test

ifconfig - should see the address set in the /etc/network/interfaces

ping -c3 192.168.0.1

Alright that's it. I will show you how to bridge your connection on Linux next time.