[Dnsmasq-discuss] use of "localise-queries"

Simon Kelley simon at thekelleys.org.uk
Tue Nov 3 20:37:27 GMT 2009

Stefano Bridi wrote:
> Hi all,
> I'm using "localise-queries" on dnsmasq to resolve the same name with
>  multiple IP based on the interface they are coming from.
> When a client in the dmz( ask for example the IP for the
>  hostname "test" it will receive an ip like but I want also that
> a client on a vpn connection( that ask for the same hostname
>  will receive the same private IP and in the meantime the clients on the lan
>  interface ( get the public IP of the server( "test"
> I have added both the IP adesses for the hostname "test" in the hosts file
>  and, as expected, when asked from the lan or from the vpn reply alternatively
>  the private IP and the public one.
> Is there a way to do that?

Localise-queries depends on matching the source of the query with
possible answers, which isn't what you want.

To get what you want will need different instances of dnsmasq running on
each interface, using the --interface and --bind-interfaces flags. It
will be messy, I'm afraid.



More information about the Dnsmasq-discuss mailing list