1

I have a new Ubuntu 18.04 VM running in VirtualBox on Windows 10. I'm connected to a local network and able to resolve local addresses from Windows. However, my Ubuntu VM can only reach internet addresses.

From the command line, I see my DNS server listed as 127.0.0.53 yet NetworkManager correctly displays the 10.x.x.x address of the DNS server on my local network.

I've fiddled around a bit with various network settings but I'm not sure how to resolve this. Any help is appreciated, thanks!

EDIT1: Interestingly, my DNS servers appear to be correct but my browser and shell commands like nslookup aren't using it by default. When I run nslookup , it works perfectly fine.

EDIT2: I tried the --natdnshostresolver1 command which @Fabby recommended, no luck there.

EDIT3: this is what my resolv.conf file looks like:

# 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
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.

nameserver 127.0.0.53
  • What does VBoxManage modifyvm szVMName --natdnshostresolver1 on do where szVMName is tour Virtual Machine name? – Fabby May 25 '18 at 20:28
  • No difference, I've tried that too. – matthewcummings516 May 25 '18 at 20:35
  • How about $ systemctl status systemd-resolved. resolved is the 18.04 name resolver – Stephen Boston May 26 '18 at 0:53
  • @StephenBoston that command show this: Using degraded feature set (UDP) for DNS server 10.0.2.3 – matthewcummings516 May 26 '18 at 1:20
  • Which isn't the correct DNS server. – matthewcummings516 May 26 '18 at 1:22
0

You can resolve this by installing the resolvconf app from the repository. Up until Ubuntu 18.04 LTS the app was installed by default.

$ sudo install resolvconf

After installing resolvconf on your VM client, add your desired DNS server to the /etc/resolvconf/resolv.conf.d/head file.

Place nameserver [your preferred dns server] at the bottom of the file. After rebooting your VM client, you will see the content of the /etc/resolvconf/resolv.conf.d/head file in your /etc/resolv.conf file, which will take precedence of other settings.

  • L.D James, that worked. . . I'd love to know what was wrong but either way, it's working now. Thanks! – matthewcummings516 May 26 '18 at 2:02

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.