I installed Ubuntu Server 16.04.3 in two Virtualbox virtual machines, and then I created a NAT network and a DHCP server with the following commands from the host machine:
$ vboxmanage natnetwork add --netname testlab --network "10.10.10.0/24" --enable $ vboxmanage dhcpserver add --netname testlab --ip 10.10.10.1 --netmask 255.255.255.0 --lowerip 10.10.10.2 --upperip 10.10.10.12 --enable
I configured the Network setting of each virtual machine to use the Adapter 1 attached to 'Nat Network' testlab.
The two virtual machines can ping each other with these settings, but they cannot access the Internet. If I
ping 184.108.40.206, I have a 100% packet loss and I am unable to install any package:
$ apt-get update && apt-get upgrade Temporary failure resolving ‘gb.archive.ubuntu.com’
Both have an empty
/etc/resolv.conf and the same
I need to have them connected to each other and the Internet for testing purposes. One should act as a server, the second one as a client, and the machine acting as a server should be connected to the Internet.
I have no idea why the two servers cannot connect to the internet as Virtualbox NAT Network. Any ideas?