VirtualBox

Changes between Initial Version and Version 1 of Ticket #17584


Ignore:
Timestamp:
Mar 3, 2018 10:58:17 PM (7 years ago)
Author:
Valery Ushakov
Comment:

Thanks for the report.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #17584 – Description

    initial v1  
    1 In a Linux host's /etc/resolv.conf, it is possible to define an entry representing a DNS server running on the local host:
    2 
     1In a Linux host's `/etc/resolv.conf`, it is possible to define an entry representing a DNS server running on the local host:
     2{{{
    33nameserver 127.0.0.1
    4 
    5 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.
     4}}}
     5In 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.
    66
    77However, an equivalent construct:
    8 
     8{{{
    99nameserver 0.0.0.0
    10 
    11 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.
     10}}}
     11which 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.
    1212
    1313This has been observed with a Windows 10 guest but it's expected that other guests would see the same issue.
    1414
    15 Proposed solution: handle 0.0.0.0 exactly like 127.0.0.1 by NATting it to the NAT IP for the Linux host.
     15Proposed solution: handle `0.0.0.0` exactly like `127.0.0.1` by NATting it to the NAT IP for the Linux host.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette