I'm running VirtualBox with 2 network adapters: standard NAT (enp0s3) and a Host-only Adapter (enp0s8). I use the NAT to access the internet and the Host-only Adapter to SSH in from my local machine.
The box boots up with both adapters enabled, both have IP addresses, everything looking good.
I can SSH into this box over the host-only adapter, no issues there. But I can't get on the internet with it. However, if I disable the host-only adapter, then I can access the internet (but obviously I can no longer SSH into it over the local tunnel).
And finally, here is my netplan yaml config:
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: yes
dhcp6: yes
enp0s8:
dhcp4: no
dhcp6: no
addresses: [192.168.52.101/24]
gateway4: 192.168.52.101
Any ideas? It seems like maybe all my outbound traffic is routing through the host-only adapter somehow.
Edit: attaching the output of ip route list
in case it helps.
default via 192.168.52.101 dev enp0s8 proto static
default via 10.0.2.2 dev enp0s3 proto dhcp src 10.0.2.15 metric 100
10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15
10.0.2.2 dev enp0s3 proto dhcp scope link src 10.0.2.15 metric 100
192.168.52.0/24 dev enp0s8 proto kernel scope link src 192.168.52.101