Solved

Tool Needed for Bulk Nameserver Lookup

Posted on 2011-09-17
4
999 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
acbxyz earned 500 total points
ID: 36554486
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
ID: 36554819
That looks like just what I need.  I'll try it tonight.  Thanks!
0
 

Author Closing Comment

by:DwightIVD
ID: 36556800
Worked perfectly.  Thanks!
0
 

Expert Comment

by:Bhavik Hingrajia
ID: 41645220
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

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

726 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