VirtualBox

Opened 4 years ago

Last modified 9 months ago

#19651 new defect

DNS not working with NAT on some networks.

Reported by: eng3 Owned by:
Component: network/NAT Version: VirtualBox 6.1.10
Keywords: dns Cc:
Guest type: Linux Host type: Windows

Description

Host is Win10, Guest is Debian 10. Network set to NAT with TCP port 22 forwarded (though ssh will not work either)

Internet access worked fine until I changed WIFI networks. DNS does not seem to work. I can ping the DNS server, but DNS resolving does not work. I've noticed some strange patterns. At home it works fine. When I connect to my cellphone hotspot while at home everything worked too. At my hotel, at first it would not work. Then trying at my remote office guest wifi network, it also would not work. Then trying my cellphone hotspot mode, it also would not work. However, upon returning back to my hotel, it suddenly worked. I have the exact same pattern with trying to connect my wireguard vpn. Note back at the hotel, once I connect the vpn, dns stops working, it is unable to contact the dns server on my vpn, eventhough the host is able to. Virtualbox sees the network changes, debian updates the network configuration, I can ping addresses outside, but dns fails with the ICMP issue. I've noticed that the DNS issue is ok if I switch to a bridged network. Unfortunately, some networks will only give me one IP so getting it to work with NAT is preferred.

In the VM log, I see:

00:00:18.130180 NAT: Link up
00:00:19.424766 NAT: DHCP offered IP address 10.0.2.15

On the guest, in network manager, it has a 10.0.2.15 IP address and is able to get DNS servers matching what I have on the host. /etc/resolv.conf has the correct servers I have tried rebooting the VM. I've tried turning off the firewall on the host.

/etc/resolv.conf:

nameserver 1.1.1.1

ping 1.1.1.1 works

11:38:39.397764 IP 10.0.2.15 > 1.1.1.1: ICMP echo request, id 2960, seq 2, length 64
11:38:39.436573 IP 1.1.1.1 > 10.0.2.15: ICMP echo reply, id 2960, seq 2, length 64

dig @1.1.1.1 google.com does not work

11:38:43.814134 IP 10.0.2.15.50821 > 1.1.1.1.53: 29800+ [1au] A? google.com. (51)
11:38:43.814861 IP 10.0.2.2 > 10.0.2.15: ICMP net 1.1.1.1 unreachable, length 36
11:38:45.697058 IP 10.0.2.15.50263 > 172.30.0.27.53: 32978+ AAAA? clients3.google.com. (37)
11:38:45.697650 IP 10.0.2.15.46410 > 172.30.0.27.53: 56459+ A? clients3.google.com. (37)
11:38:45.698116 IP 10.0.2.2 > 10.0.2.15: ICMP net 172.30.0.27 unreachable, length 36
11:38:45.698446 IP 10.0.2.2 > 10.0.2.15: ICMP net 172.30.0.27 unreachable, length 36
11:38:48.814785 IP 10.0.2.15.50821 > 1.1.1.1.53: 29800+ [1au] A? google.com. (51)
11:38:48.816463 IP 10.0.2.2 > 10.0.2.15: ICMP net 1.1.1.1 unreachable, length 36

Change History (2)

comment:1 by brunomuniz, 9 months ago

I might have a similar issue, but my host is Linux. Is there anything I can provide so this gets attention from the developers?

Does the author have anything to add since this was opened? Any workarounds or fixes?

Thanks.

comment:2 by aeichner, 9 months ago

We neeed at least a VBox.log from the non working case. Preferably also a VBox.log when it works.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use