Ticket #13915 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Windows 8.1 host, VB 4.3.24 DNS for NAT Network stopped working

Reported by: tkvb Owned by:
Component: network/NAT Version: VirtualBox 4.3.24
Keywords: NAT DNS Cc:
Guest type: Linux Host type: Windows

Description (last modified by vushakov) (diff)

Host: Windows 8.1, VB 4.3.24

Guests: 2 Lubuntu 14.04.2, configured with NAT Network, static IPs, DNS, gateway

The reason I want static IPs is so that the VMs can talk to each other and to have stable names for them in /etc/hosts. Also, this is running on a laptop that moves between networks so I cannot do bridge as in some cases I can't get more than 1 IP.

With 4.3.22, I could set as the DNS server in the guests (/etc/resolv.conf) and it would work fine, DNS requests would be proxied via the host resolver (I had set --natdnshostresolver1 on each VM). This stopped working in 4.3.24, no longer responds to DNS requests, it just times out. I tried setting (again):

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyvm "Lubuntu" --natdnshostresolver1 on

but it does not help.

The only solution so far is to use a different DNS server (e.g. in the guests, but that's less than ideal because some networks don't allow access to public DNS servers, internal servers must be used instead. The idea was to have VB proxy DNS requests all the time via the host resolver so I never have to worry about DNS settings in the guests (the host always gets them correctly via DHCP).

Change History

comment:1 Changed 7 years ago by vushakov

  • Description modified (diff)

comment:2 Changed 7 years ago by vushakov

--natdnshostresolver1 affects NAT. It doesn't affect NAT Network at all.

Could you provide packet captures from a guest and from the host for "udp port 53" while doing, say, nslookup in the guest?

comment:3 Changed 7 years ago by tkvb

When using a custom "NAT Network", is the .1 host supposed to act as a DNS server or is there another address that needs to be used as a DNS server? If natdnshostresolver1 does not apply to "NAT Network" then how does DNS resolution on the host work? Will it use the host resolver?

comment:4 Changed 7 years ago by vushakov

NAT Network always has a DNS proxy listening on the .1 address. This proxy is similar to NAT DNS proxy - it relays DNS queries and answers between the guest and the real resolver. Note that for NAT this is controlled with --natdnsproxy1 flag.

NAT host resolver - controlled with --natdnshostresolver1 - is completely different. It decodes DNS queries itself and tries to answer them using host API to resolve names, like gethostbyname(3), that may or may not result in host doing its own DNS lookups. It has very limited functionality, it doesn't handle anything but name/address translations.

For NAT (the original one) if you want to use DNS proxy, you want to use the real DNS proxy, not host resolver in pretty much all circumstances, except for may be a few exotic use cases.

Now, for old NAT these flags do several things. They enable or disable the service itself, which for old NAT is at the .3 address. They also instruct the DHCP server code in NAT to tell guests that to use .3 as the resolver.

Now, back to NAT Network. It does not have an equivalent of host resolver at all. It always has DNS proxy listening (at .1:53). It has currently no official way, and this is a gap in functionality, to instruct VBoxNetDHCP process serving the NAT Network to tell guests to use its DNS proxy as the resolver.

Most likely cause of this particular bug is that somehow we failed to obtain the list of resolvers from the host, so the proxy doesn't have any servers to proxy to. Since this is on Windows I have my suspicions that this might be a regression from a recent change.

comment:5 Changed 7 years ago by mbalmer

Also see ticket #13918. Same issue on OS X.

comment:6 Changed 7 years ago by Mapache

Same here - No DNS server in NAT and NAT Network mode. I have to bride the network adapter to get a DNS server in my guest machine.

Using full patched Windows 7 as guest and Mac OSX 10.10.2 as host. Current VBox Additions installed in the guest machines. It worked fine since the upgrade to 4.3.24.

comment:7 Changed 7 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fix is part of VBox 4.3.26.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use