LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to install dig or nslookup in Debian without BIND? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-dig-or-nslookup-in-debian-without-bind-917418/)

amirgol 12-06-2011 11:35 AM

How to install dig or nslookup in Debian without BIND?
 
Hello,

I wrote a simple script for my Debian Wheezy home server that compares its current IP to the one stored in the (remote) DNS server and updates the server when those do not match. It's currently getting the IP stored in the DNS by pinging my domain, an ugly hack IMO. I'd like to directly query the DNS server with dig, nslookup or any other scriptable command, but when I try apt-get|aptitude install dig|nslookup, apt* insists that it is dependent on BIND. I don't need a local DNS server, I just want to query a remote server!

So, is there a way of installing dig or nslookup without BIND (preferably without compilation)?

jhwilliams 12-06-2011 11:52 AM

BTW, have you heard of ddclient? It is a popular open source DDNS (Dynamic DNS) that does precisely the sort of thing you describe:

http://sourceforge.net/apps/trac/ddclient/wiki/Faq

But if you're set on scripting for fun, or to achieve some other functionalities:

Anyway, those utilities are provided separately by a small package called dnsutils.

Code:

jameson@aqua:~$ dpkg -S $(which dig)
dnsutils: /usr/bin/dig


amirgol 12-06-2011 06:08 PM

Well, for fun, practice and it's already there and working. Besides, I run it of a small flash memory, so a 1KB script is probably better.

But dnsutils does not seems to be the answer I was looking for:
Code:

# aptitude install dnsutils
The following NEW packages will be installed:
  bind9-host{a} dnsutils geoip-database{a} libbind9-60{a} libdns69{a}
  libgeoip1{a} libisc62{a} libisccc60{a} libisccfg62{a} liblwres60{a}
0 packages upgraded, 10 newly installed, 0 to remove and 178 not upgraded.
Need to get 4,838 kB of archives. After unpacking 10.6 MB will be used.

10MB for one tiny utility? Isn't that a bit too much?

craigevil 12-06-2011 08:51 PM

ddclient - address updating utility for dynamic DNS services
dyndns - dynamic DNS (DDNS) update client implemented in Perl
dnsmasq-utils - Utilities for manipulating DHCP leases

amirgol 12-07-2011 02:25 PM

Thanks. I guess I'll have to stick with ping.

bathory 12-07-2011 02:31 PM

Hi,

You can try the host package to see if it fits your needs

Regards

jefro 12-07-2011 08:46 PM

install bind-utils should be about 1M.

amirgol 12-09-2011 07:10 AM

Thanks.

The host package is dependent on the same packages as dnsutils. I couldn't find a bind-utils package, but there is once called bind9utils, though it doesn't install neither dig nor nslookup.

I finally gave up and installed dnsutils.


All times are GMT -5. The time now is 08:34 PM.