Wednesday, 6 May 2020

Looking up nslookup


I regularly need to install tools and utilities onto newly-built Ubuntu boxes, and was looking for the nslookup tool today ....

I'd tried installing it via net-tools 

apt-get update && apt-get install -y net-tools

but that didn't help ...

I tried/failed to remember how I'd installed it last time ....

Then I found this: -


which reminded me about the apt-cache tool: -

apt-cache search nslookup

dnsutils - Clients provided with BIND
gresolver - graphical tool for performing DNS queries
knot-dnsutils - Clients provided with Knot DNS (kdig, knslookup, knsupdate)
libbot-basicbot-pluggable-perl - extended simple IRC bot for pluggable modules
libnet-nslookup-perl - simple DNS lookup module for perl


apt-get install -y dnsutils

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  bind9-host geoip-database libbind9-160 libdns1100 libgeoip1 libirs160 libisc169 libisccc160 libisccfg160 liblwres160
Suggested packages:
  rblcheck geoip-bin
The following NEW packages will be installed:
  bind9-host dnsutils geoip-database libbind9-160 libdns1100 libgeoip1 libirs160 libisc169 libisccc160 libisccfg160 liblwres160
...
Setting up bind9-host (1:9.11.3+dfsg-1ubuntu1.11) ...
Setting up dnsutils (1:9.11.3+dfsg-1ubuntu1.11) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...

which nslookup

/usr/bin/nslookup

nslookup -version

nslookup 9.11.3-1ubuntu1.11-Ubuntu

Job done!!

No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...