|
<- Previous Message | Next Message -> Thread Index [isp-dns] Re: script to list nameservers
If your resolver is not the authoritative server for these domain names, you can do this: make a file called 'foo' with the domain names in it, and run: $ for zone in `cat foo`; do echo "**$zone" >> output; dig $zone NS | grep "IN NS" >> output; done If you are using a more recent version of dig, this won't work (the grep "IN NS" won't get any hits). If your resolver *is* authoritative for the domain names, you'll have to use a different resolver (because your auth server will just return that all domain names are delegated to itself): $ for zone in `cat foo`; do echo "**$zone" >> output; dig @other.name.server $zone NS | grep "IN NS" >> output; done This will give you a file called output that should look like: **foo.com foo.com 1D IN NS ns1.customer.com foo.com 1D IN NS ns1.customer.com **bar.com bar.com 1D IN NS ns1.customer.com bar.com 1D IN NS ns1.customer.com **baz.com baz.com 1D IN NS ns1.otherisp.com baz.com 1D IN NS ns1.otherisp.com On Tue, 1 Jun 2004, Andrew P. Kaplan wrote: > Does anyone have a script that I can run against my 1000 domains on my > master server that would list domain name and authorative name servers. My > slave servers is going off line soon and I have been moving the nameserver, > but use a range of registrars with some being out of my control so I need a > list of domains that still have the old nameservers. > > Thank you. > > Andrew P. Kaplan > www.cshore.com > > First snow, then silence. > This thousand dollar screen dies > so beautifully. > > --Simon Firth > > > > To unsubscribe via postal mail, please contact us at: > Jupitermedia Corp. > Attn: Discussion List Management > 475 Park Avenue South > New York, NY 10016 > > Please include the email address which you have been contacted with. > -- /ak <alexk@...> An Englishman is a person who does things because they have been done before. An American is a person who does things because they haven't been done before. -- Mark Twain To unsubscribe via postal mail, please contact us at: Jupitermedia Corp. Attn: Discussion List Management 475 Park Avenue South New York, NY 10016 Please include the email address which you have been contacted with.
Thread Index |