The domain that loves BSD

Home About Me Archive 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:

  • an up to date FreeBSD version 10.x or 11
  • a connection to the internet with access to a public caching name server or
  • a connection to a local caching name server which has access to a public root or caching name server


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

$ drill

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

$ drill @

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

To find MX records of a domain name use:

$ drill mx

Do an authoritative lookup:

$ drill -o AA -o rd


Some (other) resources about this subject:

Updated: August 16, 2018