No DNS from DHCP on NAT connection

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Han Fastolfe
Posts: 1
Joined: 20. Feb 2018, 19:42

No DNS from DHCP on NAT connection

Post by Han Fastolfe »

Hi,

I have issues in Internet access from guest, which are due to missing domain name resolution.
I've the same issue on both Windows and Linux/Ubuntu guests when using NAT as network connection.
VMs are both in use from years and never had issues since the last weeks.

I've checked quite everything on host and guests configuration and come up to the fact that VirtualBox dhcp "server" does not send anymore the DNS address.

This is the output of the response to a DHCP client request and the DNS entries are missing in the response.

Code: Select all

$ sudo nmap --script broadcast-dhcp-discover

Starting Nmap 7.60 at 2019-09-12 08:08 CEST
Pre-scan script results:
| broadcast-dhcp-discover: 
|   Response 1 of 1: 
|     IP Offered: 10.0.2.16
|     DHCP Message Type: DHCPOFFER
|     Subnet Mask: 255.255.255.0
|     Router: 10.0.2.2
|     IP Address Lease Time: 1d00h00m00s
|_    Server Identifier: 10.0.2.2
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.51 seconds
As a workaround the DNS must be set manually in IPV4 configuration on each VM.

Does anyone have the same issue?
Any help will be appreciated.
Thanks.
  • HOST
    • Windows 10 Pro 1809 Edition
    • VirtualBox Version 6.0.12 r133076 (Qt5.6.2)
  • GUEST1
    • Linux Aquarius 4.15.0-62-generic #69-Ubuntu SMP Wed Sep 4 20:55:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • GUEST2
    • Windows 10 Pro 1803 Edition
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: No DNS from DHCP on NAT connection

Post by scottgus1 »

Han Fastolfe wrote:VMs are both in use from years and never had issues since the last weeks.
What happened a few weeks ago?

We would need at least a log from a guest while the problem happens. Pick one of the two guests where the problem occurs (the Windows one would be good for me) and get it completely shut down, not save-stated. Then boot it, wait for the problem to demonstrate itself, then shut down the guest from within the guest OS. If you have to wait a while, take note how many hours the guest was running when the problem happened, so we can find the right place in the log. Then zip and post the log using the forum's Upload Attachment tab.

Also, zip and post the guest's .vbox file, found in the guest's folder.

And track back and let us know what happened on the PC when the problem started.
adrelanos
Posts: 22
Joined: 9. Sep 2018, 09:48

Re: No DNS from DHCP on NAT connection

Post by adrelanos »

This started happening between VirtualBox 6.0.10 and 6.0.12. VirtualBox 6.0.10 was not affected. VirtualBox 6.0.12 is affected.

Shows in log:
00:00:00.933430 NAT: Host Resolver conflicts with DNS proxy, the last one was forcely ignored
Fixed the bug:

Code: Select all

VBoxManage modifyvm vmname --natdnsproxy1 off
Causes the bug:

Code: Select all

VBoxManage modifyvm vmname --natdnsproxy1 on
This comment inspired me to find the fix: https://www.virtualbox.org/ticket/14213 ... comment:13

Might happen when using

Code: Select all

VBoxManage modifyvm vmname --natdnsproxy1 on
at the same time as using

Code: Select all

VBoxManage modifyvm vmname --natdnshostresolver1 on
dunno if

Code: Select all

VBoxManage modifyvm "$VMNAME" --natdnspassdomain1 off
is related.
Post Reply