I tried to set this up on my own using a VPS and Pi-Hole and it did work for a while. However, bad actors eventually found the server and started using it to perform DNS amplification attacks against, of all things, cricket news websites. I don't know too much about networking, so this may be a limitation of the DNS protocol. However, it seems like Quad9, Cloudflare and the like have figured out a way to prevent this sort of abuse... So, if any provider out there is reading this, please add this capability and I will gladly pay to use your DNS service.
https://adguard.com/en/adguard-dns/overview.html
Note that obviously since you are sharing all your dns requests with them, it's terrible for privacy... :'(
Right. I'm not defending this service in any way, but couldn't you say the same about Quad9 or Cloudflare?
You could set up pi-hole as a recursive dns server: https://docs.pi-hole.net/guides/unbound/ That way you don't have to use a public dns server like Cloudflare. However, since (as far as i know) dns requests are not encrypted, this is not perfect either (security wise).
At least when using Cloudflare you can use DNS-Over-HTTPS: https://docs.pi-hole.net/guides/dns-over-https/
Out of curiosity, do you have any idea how they prevent the scenario I outlined (e.g. metadata, traffic analysis)?
At that price, I doubt they do.
You don't want a malicious app do this in your back so that when you type alice.com, you see bob.com instead.
Fortunately, to some extent, HTTPS or GPG come to the rescue.
The whole approach of Pi-hole feels misguided. Blacklisting domains and hosts should be something easily done on my device locally. Then it comes with me when I visit friends or coffee shops, and it's easy to temporarily disable when it breaks something I'm trying to use.
The fact that I can't do this on things like my phone really illustrates how little control we really have over our own computing devices.