[Dnsmasq-discuss] Listen all virtual addresses

Simon Kelley simon at thekelleys.org.uk
Wed Jan 30 20:55:00 GMT 2013


On 30/01/13 14:15, Арсений Лозицкий wrote:
> Hi all!
>
> Is there a way to listen on one interface multiple ip addresses?
>
> like that:
> eth1:0 10.0.0.1
> .....
> eth1:5 10.5.0.1
>
> When I try to run multiple dnsmasq instances with separate configs and
> addresses to listen, I get error that address already in use and dnsmasq
> fails to bind to port 53.
>
> I tried to redirect traffic to multiple instances running on ports 53-60
> but It does not work at all(tcp redirect from 53 to destination port for
> subnet using iptables). All I get with that way is response telling me that
> "Unknown host hostname" except for instance running at 53 port;


This is indeed possible: you need to include

bind-interfaces

in _every_ configuration file, and


listen-address=10.0.0.1

or whatever in each configuration.

>
> Maybe,  there is a way to serve different ip addresses to clients basing on
> their source network:
>
> Like:
> If client comes from 10.0.0.0/24 and wants to know about domain.name he
> will receive response like 10.213.0.63;
> If client comes from 10.5.0.0/24 he will be forwarded to outer dns as
> there's no such local domain - domain.name.

That's possible in general only by running different instances which are 
configured differently.

If you're having difficulty making it work, post back here, including 
the configuration(s) you're using in your message.


Cheers,

Simon.

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




More information about the Dnsmasq-discuss mailing list