[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(192.168.0.0/24) ask for example the IP for the
>  hostname "test" it will receive an ip like 192.168.0.10 but I want also that
> a client on a vpn connection(10.15.0.0/24) that ask for the same hostname
>  will receive the same private IP and in the meantime the clients on the lan
>  interface (192.168.1.0/24) get the public IP of the server(21.22.23.24) "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.


Cheers,

Simon.






More information about the Dnsmasq-discuss mailing list