Nslookup command in master

Is the nslookup command still available by default in the latest master?
On some recent builds of a couple of weeks ago (around mid september), I see it's missing from the system and I am not sure how to test DNS resolution.

using ping ?

  • bind-nslookup
  • bind-dig

maybe?

Thanks, I have used ping but it feels weird.

One clarification, was this changed in master?

I remember before I was able to use the nslookup command from busybox without having to specify anything. Rather than installing the full nslookup I was happy with the one provided by busybox, maybe I can re-enable it?

I just checked the .config and I see # CONFIG_BUSYBOX_CONFIG_NSLOOKUP is not set, I am trying to enable this and recompile, it should fix it. Will mark it as solved if it does so others will find this info quickly.

1 Like

my understanding was that nslookup on Linux is an outdated tool and users are meant to use

dig

and

host

tool instead.

Both these commands are unavailable by default on OpenWrt.
Busybox provides a stripped down version of nslookup which was good enough for my case.
But it seems that more recent versions of busybox keep this turned off by default.
Space constraints are still a thing on some embedded devices.

These two lines re-enable busybox nslookup:

CONFIG_BUSYBOX_CONFIG_NSLOOKUP=y
# CONFIG_BUSYBOX_CONFIG_FEATURE_NSLOOKUP_BIG is not set
dca632 /usbstick 54°# grep '^OPENWRT_RELEASE' /etc/os-release 
OPENWRT_RELEASE="OpenWrt SNAPSHOT r17674-0d1ebf0d6d"

dca632 /usbstick 53°# /bin/busybox nslookup
BusyBox v1.34.0 (2021-10-01 22:29:02 UTC) multi-call binary.

Usage: nslookup [-type=QUERY_TYPE] [-debug] HOST [DNS_SERVER]

Query DNS about HOST

QUERY_TYPE: soa,ns,a,aaaa,cname,mx,txt,ptr,srv,any

With "Both these commands" I was referring to dig and host.

On a compilation of master I had run "make defconfig", this was the situation (I still have a device with that build):

# /bin/busybox nslookup
nslookup: applet not found

I had to do what described above to fix it:

Thanks to everyone for your input.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.