It has come to my attention that Quad9 have a blog post providing incorrect instructions for how to set up a FreeBSD system to use their service. I have attempted to get in touch with the author and get him to correct it but have received no response. So here, for the benefit of the Great Search Engine Gods, is the correct procedure; see my earlier post on the topic for more details on how it works.
# cat >/etc/rc.conf.d/local_unbound <<EOF local_unbound_enable="yes" local_unbound_tls="yes" local_unbound_forwarders="126.96.36.199@853#dns.quad9.net 188.8.131.52@853#dns.quad9.net 2620:fe::fe@853#dns.quad9.net 2620:fe::9@853#dns.quad9.net" EOF # service local_unbound setup # service local_unbound restart
No need to reboot.
Note that if you only have IPv4, you may experience slightly degraded performance unless you leave out the IPv6 addresses from the
local_unbound_forwarders line (and vice versa in the unlikely scenario where you only have IPv6).