VirtualBox

Ticket #17717 (new defect)

Opened 3 years ago

Last modified 3 years ago

DNS resolver does not work

Reported by: xnoreq Owned by:
Component: other Version: VirtualBox 5.2.10
Keywords: Cc:
Guest type: Linux Host type: Windows

Description

Adapter in NAT mode, network "192.168.100/24".

Guest network adapter is called enp0s3, ip addr shows the interface is up with "inet 192.168.100.15/25".

ip route shows "default via 192.168.100.2 dev enp0s3".

Now, on the host-side the default DNS is 192.168.1.1. The guest can ping this IP, but according to the manual/ch09.html#changenat the name server should be available at 192.168.100.3.

In the guest: drill virtualbox.org @192.168.100.3 fails with "Error: error sending query: Could not send or receive, because of network error". drill virtualbox.org @192.168.1.1 ("directly" through the DNS in the host's network) works.

I can however ping 192.168.100.3. I can also ping .2 and .4 successfully.

Attachments

Arch-2018-04-28-22-09-42.log Download (67.0 KB) - added by xnoreq 3 years ago.
VBox.log

Change History

Changed 3 years ago by xnoreq

VBox.log

comment:1 Changed 3 years ago by xnoreq

It seems like the DNS needs to be explicitely enabled like so: VBoxManage modifyvm "VM name" --natdnsproxy1 on

If that is as intended then the ticket can be closed.

comment:2 Changed 3 years ago by socratis

May I suggest something? It's usually better and faster, if issues like this one (configuration, question) get first addressed in the  VirtualBox forums. More than 95% of the issues are resolved over there, which keeps the developers focusing on the bug fixes and enhancements, and there is no need for another ticket to keep track of. For example, yours not a bug and someone from the developers has to deal with it and close it as "Invalid".

comment:3 Changed 3 years ago by xnoreq

Or a "developer" may want to improve the manual changing "and the name server can be found at 10.0.2.3." to "and the name server can be found at 10.0.2.3 if enabled before." or something like that.

comment:4 Changed 3 years ago by socratis

Not a bad idea... Here's the patch if anyone's interested (MIT license and everything of course):

Index: doc/manual/en_US/user_AdvancedTopics.xml
===================================================================
--- doc/manual/en_US/user_AdvancedTopics.xml	(revision 72051)
+++ doc/manual/en_US/user_AdvancedTopics.xml	(working copy)
@@ -1333,8 +1333,8 @@
       NAT interface +2. So <computeroutput>x</computeroutput> is 2 when there
       is only one NAT instance active. In that case the guest is assigned to
       the address <computeroutput>10.0.2.15</computeroutput>, the gateway is
-      set to <computeroutput>10.0.2.2</computeroutput> and the name server can
-      be found at <computeroutput>10.0.2.3</computeroutput>.</para>
+      set to <computeroutput>10.0.2.2</computeroutput> and the name server
+      (if enabled) can be found at <computeroutput>10.0.2.3</computeroutput>.</para>
 
       <para>If, for any reason, the NAT network needs to be changed, this can
       be achieved with the following command:</para>
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use