需要使用两个Ip。

一个外网Ip(绑定wifi网卡),一个内网(静态,与宿主机交互。)。

网络设置添加两个网卡。

virtualbox+ubuntu1604 静态ip 联网。

virtualbox+ubuntu1604 静态ip 联网。


设置dns

 cat /etc/resolvconf/resolv.conf.d/base 
nameserver 8.8.8.8

nameserver 8.8.4.4

设置静态ip .

cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).


source /etc/network/interfaces.d/*


# The loopback network interface
auto lo
iface lo inet loopback


# The primary network interface
auto enp0s3
iface enp0s3 inet dhcp


auto enp0s8
iface enp0s8 inet static
address 192.168.56.100    
netmask 255.255.255.0


网上找的教程都是这样或那样的问题。

适合自己的才是最好的!




相关文章:

  • 2022-01-14
  • 2021-12-07
  • 2021-07-31
  • 2021-09-03
  • 2022-12-23
  • 2021-06-19
猜你喜欢
  • 2021-05-08
  • 2021-04-10
  • 2021-07-20
  • 2022-02-19
  • 2021-11-23
  • 2022-01-20
  • 2022-12-23
相关资源
相似解决方案