VirtualBox

Ticket #421 (closed defect: duplicate)

Opened 2 years ago

Last modified 2 months ago

DNS not working

Reported by: rozelak Assigned to:
Priority: major Component: network
Version: VirtualBox 1.4.0 Keywords:
Cc: Guest type: other
Host type: other

Description

Hallo,

I just wanted to try VirtualBox, but I realized that dns is probably broken in 1.4.0 binary version (installed through gentoo portage), with default NAT network setting.

When I try to connect e.g. to 'www.google.com' in internet explorer (WindowsXP proffesional), it fails everytime. However, setting address '64.233.183.99' to IE works perfectly! The same situation repeats for any internet page. I have also tried to ping the gate for virtualized Windows (ping 10.0.2.2), everthing works erfectly, but the ping of dns server (ping 10.0.2.3) ends with 'Request timed out' message.

Due to the fact that net is available through addresses, I gues that the problem is in inbuild DNS. Naturally, net works perfectly from native linux.

Regards, Roz.

Change History

06/18/07 13:26:05 changed by klaus

Can you please attach a log file for a VM where DNS doesn't work? The log file shows what DNS server our built-in DNS forwarder uses. It's most likely that it uses the wrong one. VirtualBox gets the host's DNS configuration from /etc/resolv.conf.

And the issue with pinging the built-in DNS "server" is normal. See the manual about pinging in NAT network configuration.

11/03/07 21:30:58 changed by sandervl73

  • status changed from new to closed.
  • resolution set to fixed.

No reply for 5 months. Closing.

05/23/08 06:04:12 changed by Electrum

  • status changed from closed to reopened.
  • resolution deleted.

The host is Linux and uses dnsmasq for DNS caching. This could be fixed by proxying DNS or allowing DNS configuration. Note that this setup works with QEMU's NAT, so QEMU must handle it differently.

host$ cat /etc/resolv.conf 
search internal
nameserver 127.0.0.1

Log:

00:11:45.951 NAT: passing domain name internal
00:11:45.951 NAT: DNS address: 127.0.0.1
...
00:12:10.224 NAT: DNS address: 127.0.0.1

07/10/08 09:58:14 changed by frank

  • component changed from other to network.

07/13/08 19:17:43 changed by Electrum

A quick summary: The host OS has 127.0.0.1 set for the DNS server in /etc/resolv.conf. VirtualBox passes 127.0.0.1 as the DNS server to the guest OS. This obviously incorrect as 127.0.0.1 is the loopback address.

08/31/08 16:30:37 changed by majeru

Hello,

Try to edit /etc/dhcp/dhclient.conf and remove this line: prepend domain-name-servers 127.0.0.1;

Cristi

11/19/08 20:07:10 changed by frank

  • status changed from reopened to closed.
  • resolution set to duplicate.

Duplicate of #1470.

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy