!!!恳求指点:如何在ubuntu8.04下为virtualbox建立一个桥接
-
- 帖子: 3
- 注册时间: 2008-10-26 20:55
!!!恳求指点:如何在ubuntu8.04下为virtualbox建立一个桥接
小弟,最近在ubuntu下安装了virtualbox,虚拟了一台windows。想要给虚拟的机器建立一个桥接,可是参考了很多网上的教程(有些说的是7.1下的桥接)都不行,不是主机不能上网就是虚拟机不能上网。真惆怅。请成功的同志提点下哦
-
- 帖子: 3
- 注册时间: 2008-10-26 20:55
Re: !!!恳求指点:如何在ubuntu8.04下为virtualbox建立一个桥接
这么大的论坛竟然没人帮解决下这点小难题,真失望啊
-
- 帖子: 4
- 注册时间: 2008-10-30 11:53
-
- 帖子: 3
- 注册时间: 2008-10-26 20:55
Re: !!!恳求指点:如何在ubuntu8.04下为virtualbox建立一个桥接
为了方便后辈菜鸟,我自问自答吧。很简单。
1 安装必须软件
sudo apt-get install uml-utilities bridge-utils
2 添加本人帐户到软件组
sudo gpasswd -a bruce uml-net
3 修改interface文件内容如下
sudo vi /etc/network/interfaces
auto lo
iface lo inet loopback
auto tap0
iface tap0 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user bruce
auto tap1
iface tap1 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user bruce
auto tap2
iface tap2 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user bruce
auto br0
iface br0 inet static
address 192.168.1.188
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
bridge_maxwait 0
bridge_ports all tap0 tap1 tap2
auto eth0
allow-hotplug eth0
iface eth0 inet manual
up ifconfig eth0 0.0.0.0 promisc up
4 重启机器配置生效!
1 安装必须软件
sudo apt-get install uml-utilities bridge-utils
2 添加本人帐户到软件组
sudo gpasswd -a bruce uml-net
3 修改interface文件内容如下
sudo vi /etc/network/interfaces
auto lo
iface lo inet loopback
auto tap0
iface tap0 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user bruce
auto tap1
iface tap1 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user bruce
auto tap2
iface tap2 inet manual
up ifconfig $IFACE 0.0.0.0 up
down ifconfig $IFACE down
tunctl_user bruce
auto br0
iface br0 inet static
address 192.168.1.188
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
bridge_maxwait 0
bridge_ports all tap0 tap1 tap2
auto eth0
allow-hotplug eth0
iface eth0 inet manual
up ifconfig eth0 0.0.0.0 promisc up
4 重启机器配置生效!