-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 If the CNAME is updated automatically, it should have a very short (or even zero) time-to-live in the upstream nameserver. Dnsmasq will honour such a TTL value.
Cheers, Simon. On 31/03/16 10:23, Fabio Venturi wrote: > 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 > > > > _______________________________________________ Dnsmasq-discuss > mailing list Dnsmasq-discuss@lists.thekelleys.org.uk > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBCAAGBQJXApQ9AAoJEBXN2mrhkTWiR0kP/RULVQ5iTfFTmwd5WqBFjTPY Q6cw6bLXAzAOaRr3/1yU54Zwka/NglSvKDANPyEr+smxGY27I1p9hTcYpmh/nC8v 5XSXpzjMMCy24twhh3950GOvxZ1hbO19xNsC/lBWpL0B/gr7sjgL/BHO2YtL0art TACJXx6hr+6TKAdw9i/NcPFiJWeQrZPTCPDJGfuxXEVlUr4hImC48vEFVHh/jsju rDF4y2WpmCMtODmud8IemepKOtZ0DztHaiOokIKypzaKSY4thIaVafb5HlKOGJKi EjkbzGEhL0JTl1KnYBKK20e18P3cQKVN/S8btNNwCsiOGyUspB3N1eDN2+SQ3dXr f85HqWnv7+jHIZLBn986GaJirAmIADv8CIccY1DRhm113OiS5DwAZcdaDLzkF6Ul hNB1eITXr/Jfrh45tPKpEpC/OGw+6rP2FpyEkBCsRMIudiub2Fb2lA/gBoiUQFFv V8DKlsuwhGmLpLtFFNR+9+pfSd2n1U15vhpfbHtD7TyRzx/+71uuWmqxXQLVZ9BP dsGuAUK8FVZv39qm+F27kDXT0diqLWxP3jA02bcHuiu3JBN7Ey2JuTioLKfUjUW1 6DZDZrBhzpix/2t7hokkVBtaoin0vz1PH9eGr41GF9zQKWiMsdaqXTUAaXwW3TIq etK5IlnHWJP2bAG/wNfY =F4JN -----END PGP SIGNATURE----- _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss