I have installed Ubuntu Server 16.04 on a Virtual machine as a guest OS on my mac.
as always I have set it up with NAT and "Host Only" with the following configuration the way I had all my other VM Boxes with Ubuntu 14.04 to have static IP and Internet. but they seem not to work with the new Ubuntu. although "ifconfig" is giving me an OK result, I don't have Internet and I cannot reach my guest machine from my host machine with the mentioned IP.
my /etc/network/interfaces looks like this:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto enp0s3
iface enp0s3 inet static
address 192.168.56.106
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4
and the result of "ifconfig -a" looks something like this:
any Idea why this is not working on Ubuntu 16.04 ?
Please note: I have restarted my network service(/etc/init.d/networking) and machine completely some hundred times.
I guess the problem was the new naming in Ubuntu 16.04. so I set my first Adapter to "Host-only Adapter" and second one to "NAT" and i could successfully get my IP set to "192.168.56.106" with following configuration.
here is my /etc/network/interfaces
:
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# Host Only Network
auto enp0s3
iface enp0s3 inet static
dns-nameservers 8.8.8.8 8.8.4.4
address 192.168.56.106
network 192.168.56.0
netmask 255.255.255.0
broadcast 192.168.56.255
# NAT Network
auto enp0s8
iface enp0s8 inet dhcp