Solved

Tool Needed for Bulk Nameserver Lookup

Posted on 2011-09-17
4
935 Views
Last Modified: 2016-06-08
I am getting ready to relocate data centers, and am trying to compile a list of DNS changes that will be needed.  I have a spreadsheet of hundreds of domain names that are owned by my company, and hosted at the old data center.  I'm looking for a tool that would allow me to lookup the nameservers and IP for each of the domains, and generate a list.  I've looked at Sam Spade - but it looks like it needs custom scripts for bulk lookup, and the site with the documentation seems to be down.  What I need to end up with is a text file or spreadsheet showing, domain, nameservers, and IP if possible.

Any suggestions would be greatly appreciated.

Thanks
Dwight
0
Comment
Question by:DwightIVD
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
acbxyz earned 500 total points
Comment Utility
If you have a linux server, you can use this little bash-script
#!/bin/sh

export LC_MESSAGES=C

echo '"hostname";"ip address";"nameservers"' > lookup-result.csv
while read HOST; do
    IP=$(host -t a  $HOST | awk '{print $4}' | tr '\n' ' ')
    NS=$(host -t ns $HOST | awk '{print $4}' | tr '\n' ' ')
    echo "\"$HOST\";\"$IP\";\"$NS\"" >> lookup-result.csv
done < lookup-domains.txt

Open in new window

The scripts needs a file lookup-domains.txt in your working directory containing one domain name per line and will give you a csv-file with three columns
0
 

Author Comment

by:DwightIVD
Comment Utility
That looks like just what I need.  I'll try it tonight.  Thanks!
0
 

Author Closing Comment

by:DwightIVD
Comment Utility
Worked perfectly.  Thanks!
0
 

Expert Comment

by:Bhavik Hingrajia
Comment Utility
I tried it and it game me no records... it just shows found, found, found in other 3 columns... no records... PFA
lookup-result.csv
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now