VirtualBox

Opened 6 years ago

Closed 6 years ago

#17584 closed defect (fixed)

DNS server IP 0.0.0.0 not propagated to guest VM in NAT mode -> fixed in 5.2.10

Reported by: DaveU8282 Owned by:
Component: network/NAT Version: VirtualBox 5.2.6
Keywords: Cc:
Guest type: Windows Host type: Linux

Description (last modified by Valery Ushakov)

In a Linux host's /etc/resolv.conf, it is possible to define an entry representing a DNS server running on the local host:

nameserver 127.0.0.1

In this case, a VirtualBox VM with a virtual network interface in NAT mode will see an IP in the NAT network provided in place of 127.0.0.1, thus making it possible for the VM to use the host's local DNS server. For instance, if 10.0.0.2 is assigned to the VirtualBox host and 10.0.0.3 is assigned to the guest, the guest would see 10.0.0.2 in the DNS resolver list.

However, an equivalent construct:

nameserver 0.0.0.0

which also represents the local Linux host, is not correctly handled by VirtualBox NAT. In this case, the VM will see 0.0.0.0 in the DNS server list which is not NATted to the host. This results in a broken DNS resolver entry. If there is no other nameserver in the resolver list, DNS lookups will fail, or if there are additional nameservers in the list, DNS lookups will be delayed due to the lame 0.0.0.0 DNS server entry.

This has been observed with a Windows 10 guest but it's expected that other guests would see the same issue.

Proposed solution: handle 0.0.0.0 exactly like 127.0.0.1 by NATting it to the NAT IP for the Linux host.

Change History (2)

comment:1 by Valery Ushakov, 6 years ago

Description: modified (diff)

Thanks for the report.

comment:2 by Michael Thayer, 6 years ago

Resolution: fixed
Status: newclosed
Summary: DNS server IP 0.0.0.0 not propagated to guest VM in NAT modeDNS server IP 0.0.0.0 not propagated to guest VM in NAT mode -> fixed in 5.2.10
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use