VirtualBox

Ticket #5698 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Host resolver proxy unable to resolve host or domain names containing a dash "-" => Fixed in SVN/3.1.2

Reported by: ahaerpfer Owned by:
Priority: major Component: network/NAT
Version: VirtualBox 3.1.0 Keywords: NAT, UseHostResolver, DNS, proxy
Cc: Guest type: Linux
Host type: Mac OS X

Description

Description

When using the host resolver DNS proxy (UseHostResolver) from within a guest OS it is not possible to resolve host or domain names containing a dash ("-"). These both result in an NXDOMAIN return status for the DNS request instead.

This happens both for host names contained in the host system's /etc/hosts file as well as for hosts/domains that are passed on to the outside DNS.

Hosts and domains not containing a dash are being resolved OK both from /etc/hosts and outside DNS servers.

Demo case

/etc/hosts on host system:

192.168.200.11  skylight
192.168.200.21  s10-1

Guest configuration:

$ VBoxManage getextradata usrv01 enumerate
[...]
Key: VBoxInternal/Devices/e1000/0/LUN#0/Config/UseHostResolver, Value: 1

Guest's /etc/resolv.conf:

nameserver 10.0.2.3

DNS lookups for systems in host's /etc/hosts file:

  • No dash => OK
$ dig skylight

; <<>> DiG 9.5.0-P2 <<>> skylight
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8202
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;skylight.                      IN      A

;; ANSWER SECTION:
skylight.               3600    IN      A       192.168.200.11

;; Query time: 7 msec
;; SERVER: 10.0.2.3#53(10.0.2.3)
;; WHEN: Tue Dec  8 18:38:55 2009
;; MSG SIZE  rcvd: 42
  • With dash => NOK
$ dig s10-1

; <<>> DiG 9.5.0-P2 <<>> s10-1
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 47086
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;s10-1.                         IN      A

;; Query time: 135 msec
;; SERVER: 10.0.2.3#53(10.0.2.3)
;; WHEN: Tue Dec  8 18:39:16 2009
;; MSG SIZE  rcvd: 23

"Outside" DNS lookups:

  • No dash => OK
$ dig www.sun.com

; <<>> DiG 9.5.0-P2 <<>> www.sun.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19765
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.sun.com.                   IN      A

;; ANSWER SECTION:
www.sun.com.            3600    IN      A       72.5.124.61

;; Query time: 139 msec
;; SERVER: 10.0.2.3#53(10.0.2.3)
;; WHEN: Tue Dec  8 18:43:06 2009
;; MSG SIZE  rcvd: 45
  • With dash => NOK; name actually should resolve and does so on the host system
$ dig www.lrz-muenchen.de

; <<>> DiG 9.5.0-P2 <<>> www.lrz-muenchen.de
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 56889
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;www.lrz-muenchen.de.           IN      A

;; Query time: 4 msec
;; SERVER: 10.0.2.3#53(10.0.2.3)
;; WHEN: Tue Dec  8 18:46:02 2009
;; MSG SIZE  rcvd: 37

Attachments

VBox-usrv01-20091209.log Download (36.8 KB) - added by ahaerpfer 4 years ago.
VBox.log for guest system "usrv01".

Change History

comment:1 Changed 4 years ago by Hachiman

Could you please attach the log file?

Changed 4 years ago by ahaerpfer

VBox.log for guest system "usrv01".

comment:2 Changed 4 years ago by ahaerpfer

Sorry for not doing so in the first place; I've now uploaded the log for the VM in question.

comment:3 Changed 4 years ago by Hachiman

Thanks, I've been able reproduce the problem locally.

comment:4 follow-up: ↓ 5 Changed 4 years ago by ahaerpfer

Addendum: This seems to be independent on guest OS type (as I would have expected anyway). The same behaviour also shows in an OpenSolaris and a Solaris 10 guest system.

comment:5 in reply to: ↑ 4 Changed 4 years ago by Hachiman

Replying to ahaerpfer:

Addendum: This seems to be independent on guest OS type (as I would have expected anyway). The same behaviour also shows in an OpenSolaris and a Solaris 10 guest system.

thanks for information.

comment:6 Changed 4 years ago by frank

  • Summary changed from Host resolver proxy unable to resolve host or domain names containing a dash "-" to Host resolver proxy unable to resolve host or domain names containing a dash "-" => Fixed in SVN/3.1.2

comment:7 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use