$ apt-get install bridge-utils
2. back up the current interfaces file
$ cp /etc/network/interfaces /etc/network/interfaces.backup
3. edit /etc/network/interfaces
for static ip address,
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
bridge_ports eth0 vbox0 vbox1
# The loopback network interface
auto lo
for dynamic address,
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet dhcp
bridge_ports eth0 vbox0
# The loopback network interface
auto lo
iface lo inet loopback
3. restart networking
$ /etc/init.d/networking restart
4. declare virtual interfaces
$ vi /etc/vbox/interfaces
# Each line should be of the format :# [interface name] [user name] [bridge]
vbox0[user name] br0
vbox1[user name] br0
...
for VirtualBox OSE
$ /etc/init.d/virtualbox-ose restart
for pre-compiled proprietary version
$ /etc/init.d/vboxnet restart
5. set permission on /dev/net/tun
$ chown root:vboxusers /dev/net/tun
$ chmod g+rw /dev/net/tun
6. This file is created with the default permissions every time the system
restarts, edit the file /etc/udev/rules.d/20-names.rules to make the new permissions permanent
KERNEL=="tun", NAME="net/%k"
to
KERNEL=="tun", NAME="net/%k", GROUP="vboxusers", MODE="0660"
No comments:
Post a Comment