I just installed VirtualBox 1.5.2 and spent almost entire day to figure out for setup of Host Interface Networking (HIN) in VirtualBox. The problem is that if the firewall is running the guest cannot get access to the network. To figure out it took me a while. Anyway following is the step by step for setting up HIN.
System: openSuese 10.3 with a lot of patches.
VirtualBox binary version from
http://www.virtualbox.org/wiki/Downloads
Assumption: 1. eth0 is already setup and running.
2. There is no firewall running on the host. If the firewall is running, better turn it off before you pull your hairs out of your head like me.
If the firewall is running guest cannot get network access. Don't know why.
Host netowrking setup for VirtualBox
1. Check if bridge-utils and uml-utilities packages are installed.
2. Create 'eth1' without any device attached using a YaST or just create
/etc/sysconfig/network/ifcfg-eth1 with contents shwn below. 'eth1' will be the bridge device.
If eth1 device is created with YaST the last two lines in ifcfg-eth1 have to be added and NETMASK has to be setup properly.
#### contents of ifcfg-eth1 after bridge setup
BOOTPROTO='dhcp'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR=''
MTU=''
NAME=''
NETMASK='255.255.255.0'
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
USERCONTROL='no'
### Following two lines are added manually.
BRIDGE='yes'
BRIDGE_PORTS='eth0'
3. Change the IPADDR line in /etc/sysconfig/netowrk/ifcfg-eth0 to
IPADDR='0.0.0.0/24' and BOOTPROTO to BOOTPROTO='static'.
Contents of 'ifcfg-eth0'after bridge setup
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='0.0.0.0/24'
MTU=''
NAME='Giga-byte RTL8111/8168B PCI Express Gigabit Ethernet controller'
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
USERCONTROL='no'
PREFIXLEN=''
4. Run the following command to make 'vbox0' permanent.
/usr/sbin/VBoxAddIF vbox0 <user> eth1
Replace <user>> with the name of the user who is supposed to be able to use the new interface. vbox0 is the ethernet interface for HIN in VirtualBox
5. Finally, one can bring up the new interface, eth1 by executing
ifup eth1