in reply to Get all aliases of a DNS

Sorry, the RFCs for DNS only allow for the reverse lookup of the Primary name for an IP. Unless you have access to the server's records flat database files, you can't lookup anything else. Even though www.perlmonks.org maps to 66.39.54.27 (and 209.197.123.153), 66.39.54.27 maps back to ads.perlmonks.org. Unless I have access to the perlmonks.org zone file, I don't know that it also maps back to www.perlmonks.org. The same holds true for the perlmonks.com and perlmonks.net zone files. Finally, if I own the xyz.info domain, I can assign pm.xyz.info to 66.39.54.27 without needing (technically, not ethically) permission from The Monastery.

Basically, what I'm saying is that there is no way (unless you want to try every single possible permutation of every top-level domain and do a query to see if it returns your IP#, there is no way to determine every name that will correspond to a specific IP#.

- - arden.
p.s. this thread has nothing to do with perl and a bit to do with DNS.

Replies are listed 'Best First'.
Re: Re: Get all aliases of a DNS
by gmishra (Sexton) on Feb 26, 2004 at 08:52 UTC
    hey, thanks for the response. I guess, i will work on the flat file that i get by "nslookup ls -t CNAME $mynameserver". Though that is quite a raw method.
      Most domains don't allow downloading the entire zone file for security reasons. If you are using your nameserver and your domain, then it might allow it. In that case, you probably have access to the original file.

      Also, you need to distinguish between names pointing to the name IP address, and aliases pointing to the same name. A records map name to IP address; you can have multiple names with the same IP address. CNAME records map names to other names. There can be multiple CNAME records with the same destination name.

      Finally, this will only find names in the domain you are looking at. It will not search other domains or all the domains in the world. For example, there are a couple of domains that say they are hosted on our nameservers but are not. There is no way to search for these.

        Thank You. That clears my doubt.. I am looking at my name server actually and i have the required access. Thanx again for the time and effort.