In my last post, I've focused on the immediately obvious merits of a local DNS resolver. I didn't comment on an issue that I find at least as important: privacy, or rather, the lack thereof in the DNS system. Read Geoff Huston's excellent post for an overview.
One of the main reasons why I've chosen Unbound as my local DNS resolver is that it was designed with privacy in mind. In particular, it supports QNAME minimization and DNS over TLS. The latter is only one of the various possible approaches that are currently under discussion for the realization of an encrypted DNS system. However, it is among the few that already work: there are a number of test servers in essentially continuous operation. I've used it for a couple of weeks and did not experience any interruption of service.
To test whether a server really offers DNS over TLS, use pydig:
pydig @220.127.116.11 +dnssec +tls=auth +tls_hostname=getdnsapi.net www.heise.de
pydig @18.104.22.168 +dnssec +tls=auth +tls_hostname=getdnsapi.net www.heise.de
In order to use DNS over TLS in Unbound, we only need minimal modifications of the configuration files I've posted previously. First of all, we of course need to define authoritative servers supporting DNS over TLS. Second, encryption has to be enabled.
forward-addr: 22.214.171.124@853 # securedns.eu over TLS forward-addr: 126.96.36.199@853 # getdnsapi.net over TLS forward-first: no forward-ssl-upstream: yes
After restarting the resolver with
systemctl restart unbound.service
all of your DNS requests are encrypted over TLS. 😊