[Dnsmasq-discuss] localise-queries with interface-name

Simon Kelley simon at thekelleys.org.uk
Wed Mar 4 20:44:04 GMT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 27/02/15 13:32, Jason A. Donenfeld wrote:
> Hi Simon,
> 
> Right now I have in my /etc/hosts file the following:
> 
> 10.59.0.1        vitrycore.office.grafitroniks.fr vitrycore 
> 10.59.248.1      vitrycore.office.grafitroniks.fr vitrycore 
> 10.59.32.1       vitrycore.office.grafitroniks.fr vitrycore 
> 10.59.252.1      vitrycore.office.grafitroniks.fr vitrycore 
> 192.168.1.1      vitrycore.office.grafitroniks.fr vitrycore
> 
> And then in my dnsmasq config I have
> 
> localise-queries
> 
> The result is that depending on the interface, the right IP will be
> returned.
> 
> I'd rather not hard code this in /etc/hosts, however. Instead it'd
> be nice to use the interface-name options, so that I could write:
> 
> localise-queries 
> interface-name=vitrycore.office.grafitroniks.fr,eth6.10 
> interface-name=vitrycore.office.grafitroniks.fr,eth6.80 
> interface-name=vitrycore.office.grafitroniks.fr,eth6.200 
> interface-name=vitrycore.office.grafitroniks.fr,eth7 
> interface-name=vitrycore.office.grafitroniks.fr,vtun0
> 
> And then localise-queries would serve the correct one, depending
> on the interface.
> 
> More generally, it'd be nice if the localise-queries option could
> work for *all* specified records, not just those in /etc/hosts.
> 
> What do you think?

Define *all*. Stuff arising from --host-record is trivial to do, and
certainly should be. Records coming from DHCPv4 don't count, since a
host can have only one address. DHCPv6 allows multiple addresses, so
that may be a candidate.

interface-name, I can't see a reason not to do.



Cheers,

Simon.

> 
> Jason
> 
> _______________________________________________ Dnsmasq-discuss
> mailing list Dnsmasq-discuss at lists.thekelleys.org.uk 
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlT3bpQACgkQKPyGmiibgrfdnwCfQ9y33qBVlnP9QidZ+y93GMbm
kxEAn0m6OlzGbjcV/khsEZX5CqiO+2v2
=CGME
-----END PGP SIGNATURE-----



More information about the Dnsmasq-discuss mailing list