OpenBSD 6.3, Unbound and TLS
So I configured OpenBSD 6.3 to use DNS over TLS and ran into a snag that revealed an extremely poor decision by the Unbound folks, where a config that you might at first glance validates the presented TLS certificate actually does no such thing.
Why is this the case? Because the Unbound people chose to specify the TLS auth name with #, the same as is used to indicate that the rest of the line is a comment!
forward-zone: forward-addr: 1.1.1.1@853#not-really-cloudflare-dns.com forward-addr: 9.9.9.9@853#not-really-dns.quad9.net
With current Unbound, this should fail. I haven't tested it quite yet. However... OpenBSD 6.3, due to OpenBSD's wonderfully-consistent release schedule, shipped Unbound 1.6.8, which did not support this #foo TLS authentication syntax and treats it as a comment. The effective configuration is thus actually as below:
forward-zone: forward-addr: 1.1.1.1@853 forward-addr: 9.9.9.9@853
Note, this definitely isn't OpenBSD's fault. Their shipped version of the Unbound manpages don't describe the #foo syntax, so one must not assume that it is supported.
A smarter delimiter choice (maybe & or % or ^) by the Unbound people would have resulted in this generating a configuration error. I learned something here and will apply it in my own software.









