VirtualBox+ubuntu-16.04.2 下NAT+Host-only网络配置

VirtualBox+ubuntu-16.04.2 下NAT+Host-only网络配置

VirtualBox 5.1.20

ubuntu-16.04.2服务器版。

主要用于工作编译,虚拟机放在后台跑。windows下ssl登录。占用资源少。配置虚拟机网络为NAT+Host-only模式。在没有外网的情况下,windows也能连接登录。

1、Settings - Network 加两块网卡,NAT,Host-only。其它默认

2、启动ubuntu,网口配置文件/etc/network/interfaces添加如下

  auto enp0s8

  iface enp0s8 inet static      //静态地址

  address 192.168.56.5      //Host-only虚拟网卡地址

  netmask 255.255.255.0   //网关

3、重启服务或者reboot。

over

posted on 2017-06-24 15:06  ChenPotato 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/ChenPotato/p/7073430.html

你可能感兴趣的:(VirtualBox+ubuntu-16.04.2 下NAT+Host-only网络配置)