<div dir="ltr"><div><div><div><div><div><div><div>Hello to anyone,<br></div>I've setup dnsmasq on several machine, mostly to avoid the limitation of 3 NS in resolv.conf ,<br></div>as a bonus now I have a nice caching for name resolution (no DHCP needed).<br></div>The problem arise with a single hostname (a CNAME really) that is updated automatically<br>under certain circumstances.<br><br>Is there a way to disable caching only for some names?<br><br></div><div>I've found a workaround, but i don't know if it's a bug:<br></div><div>if I put in /etc/hosts all the real hostname to which the CNAME could refer to (but NOT the CNAME itself),<br></div><div>the CNAME is never cached and all requests for that CNAME are always sent to the upstream DNS.<br></div><div><br>For example, in /etc/hosts:<br></div><div>srv1.mynet.lan  1.1.1.1<br>srv2.mynet.lan  2.2.2.2<br>srv3.mynet.lan  3.3.3.3<br><br>(logging the queries sent to dnsmasq, i can see the following request is always forwarded)<br># host service.mynet.lan  <br>service.mynet.lan is an alias for srv2.mynet.lan.<br>srv2.mynet.lan has address 2.2.2.2<br><br></div><div>I hope i've explained clearly the problem,<br></div><div>thank you in advance for any hint.<br><br></div><div>My kindest regards,<br></div><div>Fabio<br></div><div><br><br></div></div></div></div></div>