After getting my Pi-Hole working with Cloudflared and Unbound on separate listening addresses, I installed DNSCrypt-Proxy 2.0.
After doing so, I changed the DNSCrypt listen_address flag to 127.0.0.4:5554 and expected it to work (my other proxies/resolvers are on .2:5552 and .3:5553).
Actual Behaviour:
It didn't work. Sudo netstat -tulpen | grep 5554 showed nothing and running the command w/o the | showed that DNSCrypt wasn't listening on any port.
I changed back to 127.0.0.1:5300 and it worked fine.
I would like to be able to change the address so I can name the proxy in Hosts and have it display separately in the Pi-Hole's "Queries answered by" chart.
Having implemented similar changes for Cloudflared and Unbound, I'm not sure what is different about DNSCrypt.
Thanks, I'll do that. I had seen similar questions answered here.
I'm not running all three in parallel.
Right now, I'm running DNSCrypt-Proxy with Unbound (recursive only) as a back up using the "strict-order" flag in dnsmasq.
I am no longer using Cloudflared (it seems unstable) and I may stop using Unbound once I better understand how DNSCrypt handles fallback.
What I've been trying to accomplish from the beginning is using DoH/DoT upstream servers with a local recursive server as a fallback.
I thought Unbound would do this on its own and I believe later versions will. But the 1.6.0 version available on Raspbian Stretch doesn't use tls-cert-bundles. So DoT isn't implemented properly (can't authenticate from what I understand).
I agree. It's difficult to test. If I stop my primary resolver/proxy, it appears to fall back. But I'm not sure what would happen if the primary simply failed.
When I was using Cloudflared with Unbound as a backup and Clouflared crashed, everything stopped working. No backup. Not sure where the issue was.
My only answer to this is that it seems that encrypted DNS is more private that running a local recursive resolver. Of course, I appreciate that once I actually browse to a website, this would go out the window (absent ESNI).
Also, sometimes I use a VPN without blocking outside DNS so that I get the benefit of my Pi-Hole. If I'm using encrypted DNS, both my DNS and my traffic are hidden. I'm under the impression that my DNS would be "in the clear" if I used a local recursive resolver under the same scenario.
Please feel free to set me straight if I've got any of this wrong.
For the VPN, I agree with your conclusion. I don't think that encrypted DNS gives you any more privacy without a VPN - the ISP sees all your IP traffic anyway, and with encrypted DNS you are entrusting your entire DNS history to a third party. With unbound, it stays local. For that reason, I believe that unbound gives you better privacy (and equal security) than encrypted DNS.
Thanks, @jpgpi250. I saw that post and had consulted it.
I had no issue changing the listening addresses for Unbound and Cloudflared in their respective config files and then conforming that change to dnsmasq.d and my hosts file.
DNSCrypt is the outlier. The same change doesn't take.