List of domains managed by the DNS server

We have a server running Ensim, an old Plesk-like tool that allows us to behave as if we are a web host. Over the years, we slowly left the hosting business, but we still have several clients on our server. The server is also a DNS server, and I found that we provide DNS for old client services that we do not even host. Our goal is to turn off the server, but first we need to notify clients of any impact that it may have on them. One of the things that I notice is that we still have records in the DNS zone for several domains, but this does not necessarily mean that these domains use our DNS server. It just means that we still have notes. This makes it difficult to determine which records are used and which are old, orphaned records.

My question is: is there any tool that can tell me which domains use our DNS server? I see many ways to enter a domain and get a DNS server, but I need to go in a different direction, where I type in a DNS server and get the domains. Is there anything similar?

+4
source share
1 answer

If you have a complete list of domain names that interest you, you can use the special dig batch mode to display all name servers for all these domain names in a single request. On dig user page:

The [-f filename] option allows you to work in batch mode by reading the list of search queries to process from the file name. The file contains several queries, one per line. Each entry in the file should be organized in the same way as they will be presented in the form of requests for generation using the command line interface.

Usually you should use: dig ns microsoft.com to get the name servers for Microsoft at the linux command line. Since you need more than one, you create a file containing a list of domain names, one per line. Suppose you created a file called domainlist that contains the following lines:

 microsoft.com yahoo.com google.com 

Then you can use:

 dig ns -f domainlist 

to list name entries for everyone. I personally prefer this option:

 dig +noall +answer ns -f domainlist 

because it provides a very short list of NS entries, with no comments or other entries that do not interest me. You can also check if email records for your customer domains are still delegated to your mail server using the same method to search for mx records:

 dig +noall +answer mx -f domainlist 

Happy hunt!

+3
source

Source: https://habr.com/ru/post/1481486/


All Articles