#!/bin/sh # /etc/rc.d/rc.bridge # This is called from rc.modules # Essentially, I load the 'tun' module, then call this script # to set up the bridge. # First, set up eth0 ifconfig eth0 up ifconfig eth0 0.0.0.0 # Now set up the bridge brctl addbr br0 brctl addif br0 eth0 ifconfig br0 192.168.13.11 netmask 255.255.255.0 broadcast 192.168.13.255 # You could get an ip address via dhcp if you wanted - instead of doing # it statically here, just omit the last "ifconfig" line and put "br0" # in /etc/rc.d/rc.inet1.conf # Add the following to /etc/rc.d/rc.local # Create tun devices for vbox and add them to the bridge echo "Creating VirtualBox tun devices..." VBoxAddIF vbox0 rworkman br0 &>/dev/null # Replace "rworkman" with your username Add as many of those lines as desired