Testing your DNS IPs from /etc/resolv.conf


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » DNS

Testing your DNS IPs from /etc/resolv.confLast Modified: Sep 28, 2015, 12:46 am
If you get DNS lookup errors, it might be invalid IPs set in the file:

/etc/resolv.conf

The resolver will start at the first "nameserver" entry and work it's way down.

A sample /etc/resolv.conf might look like

nameserver 8.8.8.8
nameserver 8.8.4.4



You might have IPs specified listed by your datacenter, to use their nameservers.

To test the lookup the record of a domain: with a specific DNS IP: , set the values you want, and run the following:

dig A google.com @8.8.8.8



You might get output like this:

[root@es6-64 ~]# dig A google.com @8.8.8.8

; <<>> DiG 9.7.0-P2-RedHat-9.7.0-5.P2.el6 <<>> A google.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15679
;; flags: qr rd ra; QUERY: 1, ANSWER: 16, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             207     IN      A       216.123.194.119

;; Query time: 34 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Mon Sep 28 00:09:49 2015
;; MSG SIZE  rcvd: 284



Where the value you're looking for is the IP under the ;; ANSWER SECTION.

  • A return value can have many results, which should all be displayed if the domain resolves to more than one place.

  • If you get a blank IP in the result, it would imply that the nameserver is responding, but the domain in question is not on that server, and recursive queries are disabled. (we don't want recursive queries enabled)

  • If you cannot connect at all ensure that "named" is running, and port 53 for both TCP and UDP are open in your firewall.  Add the option +tcp or +notcp to explicitly test TCP and UDP, respectively.  Lookups will usually be using UDP if not specified.

2003 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST