I'm using Ubuntu 18.04.1 LTS in a VirtualBox VM instance. I am building an internal network in accordance with an article on setting up a non-internet accessible, isolated virtual network environment for the purpose of analyzing malware. I require internet on this VM instance to download programs to it for use with my setup. NAT mode is enabled for the VM instance in question, and I was expecting DHCP internet access upon boot up of the instance but no website is reachable.

I defined interfaces in /etc/network/interfaces for the local host and the network gateway(this VM instance). I've also defined a DHCP interface for use with NAT networking: (I've commented out the static enp0s3 interface because it was defined for use with the internal network.)

Contents of /etc/network/interfaces:

auto lo iface lo inet loopback #Internal Network #auto enp0s3 #iface enp0s3 inet static #address 10.0.0.1 #netmask 255.255.255.0 auto eth0 iface eth0 inet dhcp

I defined eth0 as a DHCP interface for use with NAT. This is assuming I needed to do this. I then entered command sudo ifup eth0 in bash as I did when I defined static interface enp0s3 for use with the internal network, but I received an error stating that interface eth0 cannot be found.

I then checked the connection that was enabled under Network Settings. The connection is defined with a routable IPv4 address: 10.x.x.x. It has DNS resolver set to Google DNS. The Hardware address is filled out. And 'Connect Automatically' is checked. MAC address is defined as enp0s8(I haven't defined this in the interfaces file). DHCP is also set to automatic under the IPv4 settings of the network connection.

I ran command sudo service network-manager restart , after sudo service networking restart was giving me an error, but I still can't reach the internet.

I used ifconfig in bash to check interfaces recognized by the system and eth0 was not among them even though I've defined it in the network configuration file. enp0s8 was however recognized.