LinuxQuestions.org
Review your favorite Linux distribution.
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-14-2010, 09:26 AM   #1
djsmiley2k
Member
 
Registered: Feb 2005
Location: Coventry, UK
Distribution: Home: Gentoo x86/amd64, Debian ppc. Work: Ubuntu, SuSe, CentOS
Posts: 343
Blog Entries: 1

Rep: Reputation: 72
DNS Checking tool - check for reverseDNS etc...


Hi all...

I'm in the process of updating the internal DNS records for all of our machines and I'm going a little bit crazy.

Basically I'm wondering if there is a tool, which can check and compare DNS records for me. I'd like to tell it to look at our private subnet, and it for to return records which have missing or different DNS records, than were expected.

Hell, if it just looked up every record and returned it in a "neat" way, that'd work too. (I'm sure someone could script this? but I dont know how! ).

Can anyone help?
 
Old 12-14-2010, 11:09 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
You're not giving us much to go by; you're using bind9, and you
have all the zone files in your hands? Use grep.


You don't have the files?
If you don't have an IDS you could simply let lose
nmap or even an ordinary shell loop w/ your IP range.

Get a list of all your IPs w/ a look-up.
Code:
for i in xx.yy.zz.{1..254}
do
  echo -n $i" : " 
  host $i | awk '{if($0~/pointer/){print $NF}else{printf "\n"}'
done


Cheers,
Tink
 
Old 12-14-2010, 11:19 AM   #3
thllgo
Member
 
Registered: Sep 2003
Location: Laurel MD
Posts: 296

Rep: Reputation: 32
If you've got money to spend Solarwinds makes a rather good DNS checking tool. It can compare DNS records to a network search of what is out there compared to what DNS says should be out there.
 
Old 12-14-2010, 04:58 PM   #4
Bertical
Member
 
Registered: Oct 2008
Distribution: Slackware
Posts: 82

Rep: Reputation: 12
A bit basic but useful :

Code:
[titch@quackers:~] $ named-checkzone -D <zonename> <filename>
 
Old 01-24-2011, 05:55 AM   #5
djsmiley2k
Member
 
Registered: Feb 2005
Location: Coventry, UK
Distribution: Home: Gentoo x86/amd64, Debian ppc. Work: Ubuntu, SuSe, CentOS
Posts: 343
Blog Entries: 1

Original Poster
Rep: Reputation: 72
Quote:
Originally Posted by Tinkster View Post
You're not giving us much to go by; you're using bind9, and you
have all the zone files in your hands? Use grep.


You don't have the files?
If you don't have an IDS you could simply let lose
nmap or even an ordinary shell loop w/ your IP range.

Get a list of all your IPs w/ a look-up.
Code:
for i in xx.yy.zz.{1..254}
do
  echo -n $i" : " 
  host $i | awk '{if($0~/pointer/){print $NF}else{printf "\n"}'
done


Cheers,
Tink
Hi Tink, Thats brilliant however there is one flaw, it checks every IP..

I'm wondering how to add a ping in, and only check if the system returns a ping...
 
Old 01-24-2011, 06:30 AM   #6
djsmiley2k
Member
 
Registered: Feb 2005
Location: Coventry, UK
Distribution: Home: Gentoo x86/amd64, Debian ppc. Work: Ubuntu, SuSe, CentOS
Posts: 343
Blog Entries: 1

Original Poster
Rep: Reputation: 72
#!/bin/bash

for i in 10.103.1.{1..254}
do
ping -c 1 -q $i 2>&1 > /dev/null
if [ $? -eq 0 ];
then
echo -n $i" : "
host $i | awk '{if($0~/pointer/){print $NF}else{printf "\n"}}'
fi
done


Yey~! \o/ thanks all
 
1 members found this post helpful.
  


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
Any tool to compare DNS results from several DNS servers? Ulysses_ Linux - Networking 13 11-04-2010 03:36 PM
mal-format xml checking tool ufmale Programming 1 09-05-2008 12:50 PM
Any memory leak checking tool? George2 Programming 2 06-21-2006 10:26 AM
reversedns.pl makko Programming 0 09-19-2005 08:47 AM
reverseDNS entry overlord73 Linux - Networking 3 04-08-2005 08:44 AM

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

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