VirtualBox下Ubuntu利用桥接方式上网

Posted 华天虎

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了VirtualBox下Ubuntu利用桥接方式上网相关的知识,希望对你有一定的参考价值。

1.打开virtualbox,选择【设置】-【网络】将连接方式改为【Bridged Adapter】

2.在Ubuntu中,

运行sudo gedit /etc/network/interfaces

修改如下:

auto lo

iface lo inet loopback

auto eth0

iface eth0 inet static

address 172.17.1.178

netmask 255.255.0.0  #此处改成您的掩码

gateway 172.17.1.111 #此处改成您的网关

运行sudo gedit /etc/resolv.conf

修改如下:

nameserver 172.17.11.31 #域名服务器

3.运行/etc/init.d/networking restart 重启

以上是关于VirtualBox下Ubuntu利用桥接方式上网的主要内容,如果未能解决你的问题,请参考以下文章