User Tools

Site Tools


ubuntu:bind:test_bind9

This is an old revision of the document!


Ubuntu - Bind - Test Bind9

resolv.conf

The first step in testing BIND9 is to add the nameserver’s IP Address to a hosts resolver.

The Primary nameserver should be configured as well as another host to double check things.

Refer to DNS client configuration for details on adding nameserver addresses to your network clients.

In the end your nameserver line in /etc/resolv.conf should be pointing at 127.0.0.53 and you should have a search parameter for your domain. Something like this:

/etc/resolv.conf
nameserver  127.0.0.53
search example.com

To check which DNS server your local resolver is using, run:

systemd-resolve --status

NOTE: You should also add the IP Address of the Secondary nameserver to your client configuration in case the Primary becomes unavailable.


dig

If you installed the dnsutils package you can test your setup using the DNS lookup utility dig:

After installing BIND9 use dig against the loopback interface to make sure it is listening on port 53. From a terminal prompt:

dig -x 127.0.0.1

You should see lines similar to the following in the command output:

;; Query time: 1 msec
;; SERVER: 192.168.1.10#53(192.168.1.10)

If you configured BIND9 as a Caching nameserver “dig” an outside domain to check the query time:

dig ubuntu.com

Note the query time toward the end of the command output:

;; Query time: 49 msec

Repeat the same dig command. There should be improvement in the time, due to caching:

;; Query time: 1 msec
ubuntu/bind/test_bind9.1607530737.txt.gz · Last modified: 2020/12/09 16:18 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki