0

Is their a command or trick to check if given server is a DNS Server or not .

deepak
  • 101
  • 1
    https://unix.stackexchange.com/questions/233527/how-can-i-check-if-my-dns-server-is-working – magor Jun 09 '17 at 21:13

2 Answers2

1

You could send a query by running:

dig @SERVERIP somedomainname.tld

Substitute SERVERIP with the DNS server in question (for example 8.8.8.8 for the Google-DNS-server) and somedomainname.tld with a domain you would like to query (for example google.com). In this case the command would be:

dig @8.8.8.8 google.com
Jodka Lemon
  • 3,173
0

As said in another answer you can just send a dns request to the server to see if it answers.

A more general way to check what a server is serving on the network is to check its open network ports with a tool like nmap. Most of the time servers will use standard ports (especially for dns), which you can find listed here https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

nmap 8.8.8.8
Starting Nmap 7.40 ( https://nmap.org ) at 2017-06-10 08:05 CEST
Host is up (0.19s latency).
Not shown: 995 filtered ports
PORT    STATE SERVICE
21/tcp  open  ftp
53/tcp  open  domain
80/tcp  open  http
443/tcp open  https
554/tcp open  rtsp

Nmap done: 1 IP address (1 host up) scanned in 237.66 seconds
Panda
  • 41