What's new

nslookup from command line not working

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

coldwizard

Regular Contributor
The nslookup command does not appear to use the server address.

The command
nslookup abc.com 172.17.7.7
from the ssh command line does not return the expected results.

It appears to acknowledge the server argument, but returns a result when it should be getting an error "DNS request timed out" since I do not have any machine at the address 172.17.7.7

I am running merlin firmware build 3.0.0.4.374.42
 
UPDATED: Good spot. Looks like a bug in busybox. It seems to be ignoring what you specify as a server and always using the local one (dnsmasq).

Code:
# nslookup bbc.net 10.2.2.2
Server:    10.2.2.2
Address 1: 10.2.2.2

Name:      bbc.net
Address 1: 63.172.252.244 webct.oakhorizons.com

# nslookup bbc.net 8.8.8.8
Server:    8.8.8.8
Address 1: 8.8.8.8 google-public-dns-a.google.com

Name:      bbc.net
Address 1: 63.172.252.244 webct.oakhorizons.com

# killall dnsmasq

# nslookup bbc.net 10.2.2.2
Server:    10.2.2.2
Address 1: 10.2.2.2

nslookup: can't resolve 'bbc.net'

# nslookup bbc.net 8.8.8.8
Server:    8.8.8.8
Address 1: 8.8.8.8

nslookup: can't resolve 'bbc.net'

UPDATE 2: Looks like a 7 year old bug! https://forum.openwrt.org/viewtopic.php?id=13917
 
Last edited:

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top