Redirect ntp request to local router

The TTL advertised for caching local DNS records is default OOTB zero seconds:

pi@ph5b:~ $ man dnsmasq
[..]
       -T, --local-ttl=<time>
              When  replying with information from /etc/hosts or configu‐
              ration or the DHCP leases file dnsmasq by default sets  the
              time-to-live  field  to  zero,  meaning  that the requester
              should not itself cache the information. This is  the  cor‐
              rect  thing to do in almost all situations. This option al‐
              lows a time-to-live (in seconds)  to  be  given  for  these
              replies. This will reduce the load on the server at the ex‐
              pense of clients using stale data under some circumstances.

Can up it to 60 seconds at first with below:

pi@ph5b:~ $ sudo nano /etc/dnsmasq.d/99-local-ttl.conf
local-ttl=60

Check for errors:

pihole-FTL --test

And apply:

sudo service pihole-FTL reload

And check (with the fritz.box domain oc):

pi@ph5b:~ $ dig +noall +answer @localhost nas.home.dehakkelaar.nl
nas.home.dehakkelaar.nl.     60      IN      A       10.0.0.3

If that reduces the number of queries, you could try lower it to two seconds and see how that goes.
You want it to be as low as possible so not to risk getting stale replies.

1 Like