I have a CentOS VM in VirtualBox. It's configured to use 2 NICs. The first NIC is NAT and gets the DHCP from VirtualBox. It's enp0s3 and here is the configuration file:
TYPE="Ethernet" PROXY_METHOD="none" BROWSER_ONLY="no" BOOTPROTO="dhcp" DEFROUTE="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="no" IPV6_ADDR_GEN_MODE="stable-privacy" NAME="enp0s3" UUID="58624aa8-5032-4fa6-8f81-81f5b25dc540" DEVICE="enp0s3" ONBOOT="yes"
The second NIC I've specified to use a static address and it runs NAT Network in VirtualBox with an address range of 10.242.34.0/24. I toggle this interface being up or down with ifup enp0s8 or ifdown enp0s8 -- it isn't needed to be up all the time. Here's the configuration file:
TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=static DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=enp0s8 UUID=fefdb96a-13f5-46c2-82d1-5a623770deac DEVICE=enp0s8 ONBOOT=no IPADDR=10.242.34.100 NETMASK=255.255.255.0 NM_CONTROLLED=no IPV6_PRIVACY=no
Anyway, the problem I'm having is when I ifup enp0s8, I can see all the hosts on the 10.242.34 network but I cannot connect to the internet. I have to ifdown enp0s8 to connect to the internet -- presumably though enp0s3's NAT connection to the host computer.
If both enp0s3 and enp0s8 are both up, why cannot I get the to the internet? It's like enp0s8 blocks any other connection.