Thursday, 8 August 2019

VirtualBox - guest Ubuntu loses DNS when host connects to VPN


I have Ubuntu guest OS in VirtualBox using default NAT for eth0.


Works fine at the office and at home EXCEPT when on office VPN from home.


When the host OS (Windows 7) is connected to the VPN, DNS lookups don't work within the Virtualbox guest. DNS lookups are fine on the host. Within Virtualbox, I can ping IPs directly both within the VPN and the outside, so it's not a connectivity problem.


It looks like the Ubuntu guest is using localhost as the DNS entry point, according to /etc/resolv.conf and nslookup. So it looks like something locally is then dispatching to other underlying DNS.


How do I troubleshoot this?



Answer



This worked for some reason


C:\...\VirtualBox\VBoxManage modifyvm "VM name" --natdnshostresolver1 on


I suspect it's because when the VPN is active, the host is doing something special for DNS lookups besides just forwarding requests to the specified DNS servers that VirtualBox picked up from the Windows config.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...