I would like to enable TLS so I can do DNS over TLS using pi-hole + unbound. Is there an updated pi-hole configuration file to support this? The only configuration I’ve been able to locate that adds to the pi-hole configuration file is the following:
When I added the above to my pi-hole configuration and then performed a wireshark capture, I didn’t see where unbound was communicating with google over TLS.
Looks pretty much the same as your's, just without tcp-upstream: yes and tls-upstream: yes, and more importantly, it is added to the server: section. Assure that is the case for you case well. tcp-upstream: yes and tls-upstream: yes are at least redundant, since the forward-zone: applies to all queries and enforces DoT already. But it should not break things either.
Also, I confirmed that it is added under the server section. Does it matter the format of the additional configuration in terms of if something needs to be left indented or not?
Sorry for the late reply. So if you added it to the end of /etc/unbound/unbound.conf.d/pi-hole.conf, that should be all fine. Indentation/spacing does not even matter, but of course for oneself it looks cleaner if all directives of one block are intended.
And you restarted Unbound systemctl restart unbound, and still do not see any TLS-encrypted traffic to 1.1.1.1 in Wireshark or similar? Do you see requests from Pi-hole to this Unbound? And where sends Unbound requests to instead?
I’m closing this topic as the error was resolved after some pain-staking research on Google using the following steps:
sudo unbound-checkconf to ensure no errors were present in the pi-hole.conf file when I added the block to enable DNS over TLS, which errors were present
sudo service unbound restart after my configuration file was good to go
netstat -an | grep :853 to see either TIME_WAIT state or ESTABLISHED state between Unbound and the forwarded entity, which in this case is 1.1.1.1 or 1.0.0.1
Therefore, based on my research, I believe I’m now performing DNS over TLS. A check I will do for good measures is a tcpdump on my Pi-hole to capture the traffic for port 853.