[Dnsmasq-discuss] Disable caching for some hostname

Fabio Venturi dalamenona at gmail.com
Thu Mar 31 10:23:08 BST 2016


Hello to anyone,
I've setup dnsmasq on several machine, mostly to avoid the limitation of 3
NS in resolv.conf ,
as a bonus now I have a nice caching for name resolution (no DHCP needed).
The problem arise with a single hostname (a CNAME really) that is updated
automatically
under certain circumstances.

Is there a way to disable caching only for some names?

I've found a workaround, but i don't know if it's a bug:
if I put in /etc/hosts all the real hostname to which the CNAME could refer
to (but NOT the CNAME itself),
the CNAME is never cached and all requests for that CNAME are always sent
to the upstream DNS.

For example, in /etc/hosts:
srv1.mynet.lan  1.1.1.1
srv2.mynet.lan  2.2.2.2
srv3.mynet.lan  3.3.3.3

(logging the queries sent to dnsmasq, i can see the following request is
always forwarded)
# host service.mynet.lan
service.mynet.lan is an alias for srv2.mynet.lan.
srv2.mynet.lan has address 2.2.2.2

I hope i've explained clearly the problem,
thank you in advance for any hint.

My kindest regards,
Fabio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20160331/6b2e7036/attachment.html>


More information about the Dnsmasq-discuss mailing list