• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 276
  • Last Modified:

list all DNS servers

Dear All,

I am looking for a way to list all DNS servers I have and the type of zones inside each server?

Thanks
0
Arabsoft-ACS
Asked:
Arabsoft-ACS
  • 2
  • 2
1 Solution
 
Chris DentPowerShell DeveloperCommented:

You can get a little by pulling the list of holders for ForestDNSZones. "nslookup forestdnszones.YourRootDomain.com" will do, you can look at the partition holders list as well. It's not exhaustive though, it will only tell you about 2003+ Domain Controllers running the DNS service.

Beyond that, the only way would be to examine each server for the DNS service; WMI works, but it won't be fast if you have a large number of servers.

Once you have the servers, types of zone can be found using WMI, or by using "dnscmd /EnumZones".

Chris
0
 
Andrej PirmanCommented:
Hmmm...it would be easier with some more details:
- Windows or Linux or Unix DNS?
- how do you mean "...all DNS servers I have"? You mean, you do not know your own dns servers?
- for which domain? Only 1 domain, or many domains?
- is it local domain, Active Directory, or web domain(s)?

Ok, but let's assume you have DNS somewhere hosted and you have your domain registered, and you did not do it yourself. And that you are corius about only 1 domain.

First, let's dig all we can about your domain.
Go to http://centralops.net and click on DOMAIN DOSSIER.
Enter your domain name and check all boxes.

If you list results, down under DNS ZONE section you will find interesting data.
What you need is:
IN  NS  records, which tell you all DNS servers, which your domain is registered with
IN  MX  records, which tell you which MAIL server receives mail for your domain

Now, althrough you will see most important data here, you will NOT see all remaining A-records and other records here. For example, there might be a sub-domain "something.domain.com", which is technically most probably A-record (or CNAME record), which is not listed there. You could see it only if you directly query for that sub-domain name.

You would be most probably interested into getting the whole DNS zone for your domain. But the whole DNS zone is most probably hard to retrieve, because zone transfers are most probably "locked" and allowed only between servers, listed as nameservers (IN NS part of zone). So you won't be able to retreive the whole zone in one pass.

So you may play around in Windows with NSLOOKUP command line tool.
Just start CMD command line, and type
NSLOOKUP
You are now inside NSLOOKUP program, and you may retreive zone data.

Try this:
set type=mx
domain.com

set type=all
domain.com

You may try with other types (A, MX, NS, CNAME) and learn about your domain.
Hope it helps.
0
 
Chris DentPowerShell DeveloperCommented:

The author has a lot of posts in the AD areas about auditing, hence the MS assumptions in my original post :)

Chris
0
 
Andrej PirmanCommented:
Hence the difference between your and mine answer, since I was "just passing by", looking the question only. Hope we covered any situation he was asking for :)
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now