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.
Requirements
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
Examples
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 @127.0.0.1
If a nameserver runs on a non standard port, use the -p
option:
$ drill -p 5353 printer.local.domain.tld @127.0.0.1
You can also do a reverse lookup:
$ drill -x 10.14.15.9 @127.0.0.1
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
Resources
Some (other) resources about this subject: