1

I have a setup specifying two DNS namservers. One in local, the other is external. The local one is a pihole, which itself forwards requests externally after url filtering. The external one is set in case the pihole device software or hardware fails.

The pihole response time is about 20 ms, the external response time is about 2 ms. Although the pihole is listed as a nameserver before the external, dnsmasq will by default test timing responses and use whichever is faster.

dnsmasq does however offer a parameter strict-order which should use the nameservers in the strict order they are listed, and so in this case should only use the external nameserver if the pihole "fails".

In practice using the parameter strict-order doesn't work as hoped, and the external nameserver still wins. The dnsmasq manual page doesn't go into detail about the definition of "failed".

I am looking for other parameter setting which might solve this problem.

As a last resort I would use an external program to detect pihole working order, and manipulate the dnsmasq nameserver settings accordingly. But that is not a preferred solution.

  • Alternate DNS servers with different views of the world where never a kosher solution, and if I am not wrong, the situation is the same with dnsmask. You should use the pihole for solving all the DNS requests. – Rui F Ribeiro Feb 15 at 16:28
  • The secondary is for backup if the pihole really fails. For example, a software bug crashes the software (entirely possible), or if the hardware fails (less likely). – Craig Hicks Feb 15 at 20:31
  • The secondary is for backup if the pihole really fails. For example, a software bug crashes the software (entirely possible), or if the hardware fails (less likely). *** A backup is necessary for others who need immediate continued internet access in case of pihole software or hardware failure *** If you consider the problem closely, it is actually asking to divide the duty of the two servers cleanly, exactly so that "dueling servers" does not happen. – Craig Hicks Feb 15 at 20:37
  • And that is what I am saying all along. You are having problems because that is a bad idea from the implementation point of view. What you are asking from the implementation point of view is not advisable to do. – Rui F Ribeiro Feb 15 at 21:00
  • @RuiFRibeiro - The Pihole needs to be used, but if the Pihole fails the system must continue to work seamlessly. There are other people needing to use that system who can't immediately fix it if it is broken if I am not there. Start from the requirements and figure out the implementation to achieve that. Don't you agree? – Craig Hicks Feb 16 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.