LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 11:35 AM   #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, 11:52 AM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
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, 06: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, 08:51 PM   #4
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,883
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
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, 02: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, 02:31 PM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

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

Regards
 
Old 12-07-2011, 08:46 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,974

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
install bind-utils should be about 1M.
 
Old 12-09-2011, 07: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



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 03:58 PM
(nslookup) vs (dig and host) emailssent Linux - Networking 7 10-06-2004 08:38 AM
nslookup + dig commands ptreves Linux - General 8 09-10-2004 02:46 AM
dig, nslookup rpm ashley7 Linux - Software 0 04-05-2004 08:27 AM
DIG / NSLOOKUP message? matrx88 Linux - Networking 1 08-20-2003 12:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:29 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
Open Source Consulting | Domain Registration