Checking Nameserver setup from command line
Asked Answered
Q

5

19

Is there a way to check if my domain is setup correctly on the nameservers? Ideally I'd like to run a command from command line, alternatively can use a third party tool.

for example, I'm trying to register a domain that's to be hosted on godaddy.com. I have set up the domain and can see it in my DNS list. The servers that are supposed to be setup are ns51.domaincontrol.com and ns52.domaincontrol.com, however my registration is bouncing saying that there are "No Nameservers found for {my new domain}".

Quintero answered 2/9, 2009 at 9:25 Comment(1)
try serverfault.com, you'll get more responses.Celenacelene
V
42

I think this is the shortest and quickest command to list your nameservers:

host -t ns yourdomain.com
Varela answered 11/10, 2015 at 17:24 Comment(0)
M
17

If you're on a Mac or Unix machine you can do the following from command line:

whois site.com

Toward the end it should give you a list of DNS servers.

You can filter the list, showing only the Name Server information, with:

whois site.com | grep "Name S"

Note that www.site.com and site.com are two different end points and you need to set up appropriately for both of them.

Masked answered 20/11, 2012 at 18:19 Comment(1)
FWIW the output here was a bit confusing after recently changing my nameservers. For the host -t ns example.com command, only my new nameservers were listed whereas whois example.com | grep "Name S" included both the new nameservers (top) and the old nameservers (bottom).Carhop
A
5

Zonecheck is a free software and can be run from the command line:

% zonecheck stackoverflow.com
ZONE  : stackoverflow.com.
NS <= : ns51.domaincontrol.com. [216.69.185.26]
NS    : ns52.domaincontrol.com. [208.109.255.26]

       _______________
     ,---------------.|
~~~~ |    warning    || ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     `---------------'
w> Nameservers are all part of the same AS
 | Adv: ZoneCheck
 |   To avoid loosing all connectivity with the authoritative DNS in case
 | of a routing problem inside your Autonomous System, it is advised to
 | host the DNS on different AS.
 `----- -- -- - -  -
 :   All the nameservers are part of the same Autonomous System (AS number
 : 26496), try to have some of them hosted on another AS.
 `..... .. .. . .  .
=> generic

==> SUCCESS (but 1 warning(s))

Althaalthea answered 3/9, 2009 at 7:5 Comment(1)
@bortzmeyer, thanks for the reply. +1 I accepted the answer from failboy before your response. That's a neat little tool.Quintero
C
4

There is a built-in command line for that: nslookup

Submit it, then write set type=ANY and press enter. After which specify desired domain and you'll get what you are looking for. Alternatively, enter ? and see more options for the nslookup command line.

PS: while this answer comes with a delay, hope it to be useful for others who want to check nameserver/DNS setup from command line.

Carcanet answered 3/12, 2014 at 21:0 Comment(0)
D
0

nm-tool run from the command line will give you much information, not the least of which is the DNS servers you're using. You may have to install this, but many distros have it included.

Dyestuff answered 14/4, 2014 at 11:2 Comment(1)
It would be helpful if you provided a link to this tool.Hemorrhoid

© 2022 - 2024 — McMap. All rights reserved.