Dnsmasq TTL question
Is it possible to setup DNSMASQ so that it respects the TTL it is given by the upstream DNS server, but it sends out a fixed TTL to its clients?
My DNSMASQ server is running on the same local network as all its clients. I want all my clients to be served with a 5 minute TTL, regardless of what the actual domain uses. So for instance if google.com has a ttl of 60 minutes, then I want DNSMASQ to cache it for 60 minutes, but I want my clients to receive a TTL of 5 minutes so that they query my DNSMASQ server again every 5 minutes. I basically want to avoid having each client's OS doing any caching.
Is this possible?
I have been looking at the source code for dnsmasq to see if I somehow can easily change so that dnsmasq operates like it should, however just change where it sends the result to the client so that it always sends 300 seconds. I have very basic understanding of C though, can anyone point me in the right direction in the source code as to where I can find the part where the results are sent to the client? I found where it adds it to the cache database, however I want to leave this where it is so that it still respects the upstream dns servers TTL.
|All times are GMT -5. The time now is 08:56 AM.|