3

I have a caching-only DNS here. I want it to override the TTL fields of its cached records to reduce the mean network latency.

Ideally I could set the TTL somewhere in the configuration, which would override the SOA data.

Is it somehow possible?

If not: maybe putting a proxy DNS with the required feature before the bind9 (or entirely switch it to), would be also a working solution, and thus an acceptable answer.

P.s. I absolutely admit that this is generally a bad solution. But every rule has exceptions, and this is one of them. Instead of focusing to my network details, please focus to the actually asked problem.

2

I am not aware BIND does allow changing globally the minimum TTL for answers for which is not authoritative besides making patches to the source code.

This article gives a hint about it. https://serverfault.com/questions/113954/how-can-i-override-ttl-of-an-internet-address

However, dnsmasq and Unbound can do it; you just have to use one of them instead of BIND, or use it as a DNS forwarder to BIND.

dnsmasq

--min-cache-ttl= Extend short TTL values to the time given when caching them. Note that artificially extending TTL values is in general a bad idea, do not do it unless you have a good reason, and understand what you are doing. Dnsmasq limits the value of this option to one hour, unless recompiled.

Unbound

  cache-min-ttl: <seconds>
          Time  to  live  minimum  for  RRsets  and messages in the cache.
          Default is 0.  If the minimum kicks in, the data is  cached  for
          longer than the domain owner intended, and thus less queries are
          made to look up the data.  Zero makes sure the data in the cache
          is  as the domain owner intended, higher values, especially more
          than an hour or so, can lead to trouble as the data in the cache
          does not match up with the actual data any more.
  • 2
    Bind has the feature, but it allows only ttl decrease (cache-max-ttl). I've tried cache-min-ttl, it didn't change anything. But dnsmasq and unbound will probably work. Thank you very much! – peterh Jun 6 '16 at 11:41

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.