LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-06-2011, 12:35 PM   #1
amirgol
Member
 
Registered: Apr 2011
Posts: 35

Rep: Reputation: 0
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)?
 
Old 12-06-2011, 12:52 PM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 210Reputation: 210Reputation: 210
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
 
Old 12-06-2011, 07:08 PM   #3
amirgol
Member
 
Registered: Apr 2011
Posts: 35

Original Poster
Rep: Reputation: 0
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?
 
Old 12-06-2011, 09:51 PM   #4
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,734
Blog Entries: 12

Rep: Reputation: 461Reputation: 461Reputation: 461Reputation: 461Reputation: 461
ddclient - address updating utility for dynamic DNS services
dyndns - dynamic DNS (DDNS) update client implemented in Perl
dnsmasq-utils - Utilities for manipulating DHCP leases
 
Old 12-07-2011, 03:25 PM   #5
amirgol
Member
 
Registered: Apr 2011
Posts: 35

Original Poster
Rep: Reputation: 0
Thanks. I guess I'll have to stick with ping.
 
Old 12-07-2011, 03:31 PM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,520

Rep: Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502Reputation: 1502
Hi,

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

Regards
 
Old 12-07-2011, 09:46 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,383

Rep: Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199Reputation: 2199
install bind-utils should be about 1M.
 
Old 12-09-2011, 08:10 AM   #8
amirgol
Member
 
Registered: Apr 2011
Posts: 35

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nslookup by ip problem - Bind 9 Debian Sarge kenwoodgt Linux - Networking 4 12-05-2006 04:58 PM
(nslookup) vs (dig and host) emailssent Linux - Networking 7 10-06-2004 09:38 AM
nslookup + dig commands ptreves Linux - General 8 09-10-2004 03:46 AM
dig, nslookup rpm ashley7 Linux - Software 0 04-05-2004 09:27 AM
DIG / NSLOOKUP message? matrx88 Linux - Networking 1 08-20-2003 01:15 AM


All times are GMT -5. The time now is 12:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration