I have a CentOS 7.3 VM running under Oracle VirtualBox 5.2.2. It has a NAT network (enp0s3), and a Bridged network (enp0s8) that gets IPs via DHCP directly from my wifi router. Both have promiscuous mode set. Internet connectivity was fine on this box till I added a third interface (enp0s9) which is a host-only interface with manual configuration and a static IP. Now I can no longer connect to the internet through this VM. Once I remove the interface and restart, the connectivity is restored. The interface itself is up and can be pinged from the host laptop. How do I debug this?
2 Answers
I was finally able to figure out the issue. The host-only adapter mapped the default route (0.0.0.0/0) to a second gateway. This gateway did not have internet access. All IP addresses were resolving to this route and so they all failed.
Removing the gateway from the host-only interface worked.
Just putting this here for other people who might find it useful.
sudo vi /etc/sysconfig/network-scripts/ifcfg-enp0s3/
And enable boot
ONBOOT=yes