The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Easy way to dump nameserver settings for all hosted domains??

Discussion in 'Bind / DNS / Nameserver Issues' started by lbeachmike, Sep 14, 2011.

  1. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Hey there -

    Does anybody know of any easy way to effectively do a whois to show the nameservers for every domain on a server?

    I already use the Account DNS Check plug-in from NDC Host, which is great - however, I am not looking to see what resolves to the server, but actually via what specific nameservers it each domain is using.

    The scenario is one in which multiple domains with different nameservers over many years were used to point to a particular server. We want to filter those who are using an older domain for their NS so we can discontinue that domain.

    Thanks.

    Mike
     
  2. cPdans

    cPdans Member
    Staff Member

    Joined:
    Sep 6, 2011
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    I believe that the linux command line utility "dig" would be the easiest way to accomplish this. At the command line simply type "dig ns <domain.tld> +short". Replace <domain.tld> with the domain name in question. That will output the name servers for the domain.
     
  3. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Thanks. Though, that would only dump one. I'd need to script a loop to dump them all. Although I could likely figure out the scripting portion, where would be best to pull in the list of all domains on the server from? (Including parked and add-on)

    I'm wondering if there is already something like this scripted.

    Thanks.

    Mike
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Just to clarify, you want the nameservers at the domain registrar level or the DNS zone level, since those can differ? If you want the whois entries at the registrar, this would be a different command you'd need to use.
     
  5. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Domain level.

    I want to make sure that all client domains are using our most current nameservers.

    If there are users that have their domain set to point to ns1.old.com, ns2.old.com, I'd want to be able to scan the server to find that fact so we can update their domains accordingly.

    This would be useful if an old domain was not going to be renewed, or with a business acquisition that requires nameserver transitions where one might not ultimately have control of the original domain name supporting the nameservers that originally pointed to a particular server.

    Example -

    I acquire clients from a business which has nameservers ns1/2.theirbusinessname.com and ns1/2.servername.com both in use pointing to the server.

    Most client domains are using ns1/2.servername.com, but a few are using ns1/2.theirbusinessname.com.

    I am unable to acquire their domain name, theirbusinessname.com.

    I would not want to have clients who are still using those nameserver settings because if the original business decided at some point to use ns1/2.theirbusinessname.com for something else, or to let it expire, you'd have clients with domains no longer pointing to the server.

    I hope this is much clearer.

    Thanks.

    mrk
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    By domain level do you mean domain registrar level, since domain level could be DNS zone level depending on meaning. That's why I used specific terminology.

    If you mean domain registrar level, then the issue becomes that different registrars indicate nameservers differently. For example, at GoDaddy, it has:

    If NS weren't in the nameserver names, you couldn't query using a grep to get those records. You'd have to pull the full whois information. There is simply no scripted tool that I know which provides this information.
     
  7. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    I'm sorry - yes - I am referring to the domain registrar level. Hence the challenge. Although I suppose I should check the server DNS level for the same, but that is easy.

    I figure that with all of the domain tool sites out there, somebody must have something running to do this.

    Thanks.

    mrk
     
  8. rgpayne

    rgpayne Well-Known Member

    Joined:
    Feb 25, 2003
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Texas
    Name server report at whois.sc will do the trick it will cost you but it will do the trick
     
  9. lbeachmike

    lbeachmike Well-Known Member

    Joined:
    Dec 27, 2001
    Messages:
    313
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Long Beach, NY
    cPanel Access Level:
    Root Administrator
    Excellent! Very much appreciated. It looks like this does the opposite of what I want to accomplish, but it would accomplish the task indirectly.

    Only 20 bucks for the one nameserver I checked on, so not too bad.

    Here is the URL for anybody else who stumbles upon this thread and is interested -

    Name Server Report | Domains on a Name Server | DomainTools

    Thanks.

    Mike
     

Share This Page