At work, I can connect to the internet just fine using a NatNetwork adapter in Virtualbox (or any adapter for that matter).
At home, I can't reach anything by DNS but I can ping any server I want by IP address (ie: ping google.com => "ping: unknown host: google.com", ping 8.8.8.8 => works fine). I am bouncing between OSX and Windows hosts with the same issue.
Here's the kicker: at home, if I VPN into my workplace from the HOST machine, everything works fine on the VM!
I've tried changing the DNS servers on the guest to 8.8.8.8 and 8.8.4.4, and the above still occurs. I have a hunch this is related to ipv6 (home appears to be ipv6 ready) vs ipv4 (work is still on a dedicated ipv4 address) but I have no idea where to start troubleshooting this. I noticed that when the host is disconnected from the VPN, google.com resolves to an ipv6 address, and when connected to the VPN, it resolves to an ipv4 address. And to be clear, it's like a magic switch is flipped when the host is connected to the VPN: the VM suddenly knows what address google.com is without tunneling through the VPN.
Home setup is as follows, if this helps:
Host machines: OSX and Windows
Ubuntu VM networking interfaces: NatNetwork, NAT, bridged adapter (all with same issues)
Consumer-grade Netgear AC1900 router, DHCP enabled, addresses from 192.168.1.2 - 192.168.1.254
Consumer-grade Netgear cable modem at 192.168.100.1
Comcast internet scoring a 10/10 on this site: http://test-ipv6.com/
Can someone help me understand what is going on, and how I'd go about enabling my Virtualbox'd Ubuntu client to get internet without the host connecting to the VPN? I'm a total networking n00b.
EDIT: Keeping this post updated with everything I've done
I also did the following with no changes in behavior:
Ran this on the host:
Code: Select all
VBoxManage modifyvm "VM name" --natdnshostresolver1 on
Host: Set the NatNetwork to accept ipv6
VM: Ensured both "wired" connections (NatNetwork and NAT) have all ipv6 settings set to automatic
VM: Rebooted
SOLVED:
/etc/resolv.conf was set to something specific to my workplace. I manually edited /etc/resolv.conf to the following:
Code: Select all
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
Appears to persist even after reinstalling resolv.conf. Not sure why.