LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-07-2008, 08:30 PM   #1
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
Is there a way to get a list of all machines in a local DNS?


I have a DNS server. I have the DNS server config files. I want to get the names of all the machines in the facility from DNS.

Currently, I simply parse the dns config files, but because the files live on the DNS server, I have to copy the file(s) over to get the latest names, then parse the file, then take the names & do stuff with them (like ping them all or rsync a bunch of data to each one).

Is there a way I can ask DNS to give me all the names it holds without manually fetching the dns config files?
 
Old 10-07-2008, 10:04 PM   #2
indeliblestamp
Member
 
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Blog Entries: 3

Rep: Reputation: 40
Something like host -l example.com ? (The '-a' argument also does something similar)
 
Old 10-07-2008, 11:39 PM   #3
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
The DNS server must allow full transfers for host -l to work:

Code:
$ host -l example.com
; Transfer failed.
Host example.com.mikecappella.com not found: 9(NOTAUTH)
; Transfer failed.
If the DNS server does not allow zone transfers, the only way to obtain this information is by sequentially probing for PTR records. On large networks, this is unwieldy.

Configure your DNS server to allow a zone transfer to system that requires the information.
 
Old 10-08-2008, 12:57 PM   #4
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Original Poster
Rep: Reputation: 51
That works great. Thanks guys.
 
  


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
I don't want to use my sendmail smart host for machines in my local domain blanny Linux - Networking 4 10-26-2006 10:48 PM
Setup local machine to allow lan machines to retrieve its local user mail. Brian1 Linux - Networking 3 03-30-2006 05:04 AM
Names of Local machines apocolpse Linux - Newbie 1 11-03-2005 01:59 PM
Mailing to/from local machines vanquisher Linux - Software 1 07-13-2004 08:47 AM
telnet problem between two local linux machines jkcunningham Linux - Software 2 06-23-2002 01:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:08 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