Conditional Upstream DNS Server

Hi,

I use a DNS Proxy as my upstream DNS, as this is used to unblock regionally locked tv streams. This is all working fine for me, my router points to the pi-hole that then points to the dns proxy, and all works well. My one issue is that for local content it still goes through the dns proxy unneccesarily, and this can cause 10-15 minute outages when my ISP changes my IP (i'm on crappy VDSL).

The jyst of my question is, is it possible to conditioanlly forward the upstream requests ? i.e. can I get certain local domains like tvnz.co.nz for example to forward to my ISP's DNS or cloudflare or whatever, and the rest to get sent to the DNS proxy for resolution ?

Yes, though you'll need to manually configure that, the conditional forwarding set by the web interface defaults to using the upstream/router IP address provided. Same concept though, a config file in /etc/dnsmasq.d/ with the conditionally forwarded domains and the IP address of the upstream server to query.

This thread may be of assistance: Things you can do with dnsmasq!

Thanks,

So I'd need something like server=/tvnz.co.nz/1.1.1.1 ? Can I use wildcards/regex in the tvnz.co.nz bit ? Is there doumentation on this setup ?

1 Like

Is there a way to make a shnazzy UX that can allow users to make a priority list for their various DNS upstream servers?

https://imgur.com/vz9hTfq.png

Say by using some AJAX DOMs or a Node.js - HTML5 based list that would allow drag & drop reordering and maybe a percentage based probability fuzzy logic algorithm (please excuse my lack of detail) to determine the DNS to use for lookups?

I've read above that it's possible to configure these settings with dnsmasq, but does anyone feel like it would be feasible to make/develop some sort of front-end config utility to manage these specific settings, especially from within the Pi-hole Admin back-end?

There already exists a performance algorithm in Pi-Hole that determines the best performing upstream server. See bottom of this page of the documentation.

https://docs.pi-hole.net/ftldns/dns-resolver/

You'll have to expand on that, I tried searching for that term and did not come back with anything that would be helpful for us to undertstand what is being requested. Can you tell us what you expect the behavor to be with out using any jargon or terms?

1 Like

From my reading of that, that applies to all requests ? i.e. just use the best responder for all upstream requests,

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.