[Dnsmasq-discuss] TTL override for clients?

Fredrik Ringertz Fredrik_Ringertz at livewire-connections.com
Mon Apr 19 15:14:02 BST 2010


Hi All,

I am currently using dnsmasq with a few Perl scripts which automatically reloads dnsmasq with different options on the fly. I use this to allow the user switch different firewall profiles which add/removes different "--address" options to redirect certain websites (I redirect windows update etc to another IP address if the user wants to block it temporarily etc).

The only problem with this method is that the clients OS caches the response for the period of time specified in the TTL. I therefore want to get around this issue by overriding the TTL given to them. However I don't want to change the actual TTL added to the dnsmasq cache (I don't want to add additional load to the upstream DNS servers, I just want my local clients to query dnsmasq more often). So I am interested in somehow changing the TTL given to the client, rather then the TTL added to the cache list.

Where is a good place for me to start? Could someone familiar with the source code point me in the right direction where I could hard code this option (and then I will later add a configurable parameter)? Also what are people's general opinions on this? Does this break any RFC standards? I can imagine this might be a useful feature for a lot of other people so if I manage to do this in a tidy way then I could release this as a patch for other people to use?


Best Regards

Fredde87



More information about the Dnsmasq-discuss mailing list