Learned a neat thing today — it’s possible to set custom DNS resolvers for certain domains. I can create a custom config file for dnsmasq and specify the DNS resolvers to use for those domains. I don’t have a need for it today, but may be handy in cases like archive.is not loading on Cloudflare DNS.
These requests still go through pihole, so ad-blocking capabilities are available. It’s just the upstream that changes. My test below confirms so: I have set
dnsleaktest.com to be queried using Google DNS but requests still pass through pihole.
/etc/dnsmasq.d/02-test.conf server=/dnsleaktest.com/22.214.171.124 server=/dnsleaktest.com/126.96.36.199
I use two Raspberry Pi devices at home, both running pihole with Unbound as a recursive DNS resolver. These devices are connected to my Tailscale network, so all of my devices (and my friends) can enjoy Unbound and pihole’s ad-blocking capabilities.