<div dir="ltr"><div><div><div><div><div><div>We are using dnsmasq as a proxy/caching server for our network. We need a couple of customizations in dnsmasq  for our network:<br><br>1) To be able to control the  TTLs for certain IPs which are returned using aliases.<br>
<br></div>so for e.g if I had an alias=1.2.3.4,5.6.7.8<br><br></div>I want to modify the TTL when received IP was 1.2.3.4, or the returned IP is 5.6.7.8<br><br></div>So, basically, i want to control the TTL for specific requests.<br>
<br><br></div>2) Sometimes, the responses returned by upstream servers are large. For.e.g a request for <a href="http://google.com">google.com</a> from a client would results in 10-12 IPs being returned by the upstream server. We need to capture the response and be able to return just 1 or 2 ips to the client. This is required to reduce the caching of excess data and also reduce network traffic and DNS failures on a busy network.<br>
<br></div>Please suggest how this can be done. I'm not a C programmer, but if someone can give us pointers for the changes (files/functions etc), I can attempt to make them.<br><br><br></div>TIA for your help.<br></div>