Nslookup to list all domain addresses

I occasionally get requests from users looking to determine DNS entries for a domain, but they are not sure of the name or ip address. (Trust me, this really does happen).To fulfill these requests, I generally need to list all domain entries and then review to find out the information.

To do this, it is slightly different on Linux and windows systems.

Linux -- In the Linux world, you have a couple of options.

  1. dig @<NS_SERVER> <DOMAIN> AXFR
  2. nslookup -query=AXFR <DOMAIN> [NS_SERVER]
  3. Interactively, you can use the set querytype=AXFR as in;
    • Run nslookup.
    • Enter set querytype=AXFR and press enter.
    • Enter the desired domain name, and press enter.
    • The results are displayed.

Windows -- Below are windows methods.

  1. nslookup -querytype=any -ls -d <DOMAIN>
  2. Interactively, you can use the set set type=any as in;
    • Run nslookup.
    • Enter set type=any and press enter.
    • Enter ls -d <DOMAIN> and press enter.
    • The results are displayed.

Note -- In order to execute any of the above you need the DNS server will need to be configured to allow proper access or you will likely receive a message as below;

*** Can't list domain google.com: Non-existent domain
The DNS server refused to transfer the zone google.com to your computer. If this
is incorrect, check the zone transfer security settings for google.com on the DNS

 

2 thoughts on “Nslookup to list all domain addresses”

  1. Pingback: My Homepage
  2. 774743 225508Have read a couple of of the articles on your web site now, and I truly like your style of blogging. I added it to my favorites blog web site list and will probably be checking back soon. 445496

Leave a Reply