Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Tool Needed for Bulk Nameserver Lookup

Posted on 2011-09-17
4
Medium Priority
?
1,058 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 2000 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:B M
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

What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

Question has a verified solution.

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

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.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

718 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