About Archive Other Contact

How to use drill on FreeBSD

Unbound (and ldns) are part of the FreeBSD for a while now. See the announcement from Dag-Erling Smørgrav.

With ldns also came the new DNS lookup tool drill. drill provides the same functionality as dig.

How to use drill is shown in this post wih examples.


The following requirements have to be in place to be able to implement what is described in this post:


By default drill uses name servers from /etc/resolv.conf:

$ drill ntp.xs4all.nl

You can specify specific name server by using the @ option:

$ drill ntp.xs4all.nl @

If a nameserver runs on a non standard port, use the -p option:

$ drill -p 5353 printer.local.domain.tld @

You can also do a reverse lookup:

$ drill -x @

To find the name servers of a domain:

$ drill ns xs4all.nl

To find MX records of a domain name use:

$ drill mx xs4all.nl

Do an authoritative lookup:

$ drill -o AA -o rd mail.xs4all.nl @ns.xs4all.nl


Some (other) resources about this subject:

Updated: August 16, 2018