Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#217 - nslookup behaving weirdly #5271

Closed
openwrt-bot opened this issue Oct 10, 2016 · 0 comments
Closed

FS#217 - nslookup behaving weirdly #5271

openwrt-bot opened this issue Oct 10, 2016 · 0 comments
Labels

Comments

@openwrt-bot
Copy link

openwrt-bot commented Oct 10, 2016

kbabioch:

Having built LEDE from source (a69e19d) I realized that nslookup (which is built into BusyBox) is behaving weirdly. Invoking it from command line via SSH I get an error message, although the name resolution is still working:

root@rtr1:~# nslookup google.com
nslookup: can't resolve '(null)': Name does not resolve

Name: google.com
Address 1: 172.217.22.14 fra16s14-in-f14.1e100.net
Address 2: 2a00:1450:4001:817::200e fra16s08-in-x0e.1e100.net

Notice the error message: nslookup: can't resolve '(null)': Name does not resolve

This in itself is not too much of a problem, since the addresses returned are still ok. However, according to the "-h" parameter nslookup also has a second parameter:

root@rtr1:~# nslookup -h
BusyBox v1.25.0 () multi-call binary.

Usage: nslookup [HOST] [SERVER]

Query the nameserver for the IP address of the given HOST
optionally using a specified DNS server

The [SERVER] parameter can be used to query a specific name server. This does NOT work. Regardless of what I put there, it is always the default resolver that is being queried. I am not able to query a specific nameserver, which in my case makes a difference (split horizon DNS).

For instance this query shouldn't return anything since my nameserver (ns1.babioch.de) is not configured to answer recursively:

root@rtr1:~# nslookup google.com ns1.babioch.de
Server: 10.24.0.10
Address 1: 10.24.0.10

Name: google.com
Address 1: 2a00:1450:4001:817::200e fra16s08-in-x0e.1e100.net
Address 2: 172.217.16.206 fra16s08-in-f206.1e100.net

When doing this query with dig I get the proper result:

[kbabioch@antares ~]$ dig @ns1.babioch.de google.com

; <<>> DiG 9.10.4-P3 <<>> @ns1.babioch.de google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 42493
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;google.com. IN A

;; Query time: 27 msec
;; SERVER: 10.24.0.10#53(10.24.0.10)
;; WHEN: Mo Okt 10 21:29:40 CEST 2016
;; MSG SIZE rcvd: 39

@openwrt-bot
Copy link
Author

openwrt-bot commented Oct 10, 2016

hnyman:

Sounds like the known incompatibility between musl and Busybox nslookup (that ignores the server setting).

See e.g.

@openwrt-bot
Copy link
Author

openwrt-bot commented Oct 10, 2016

jow-:

Dupe of FS#155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant