Re: [Dnsmasq-discuss] How to conditionally forward a query based on the source IP?

2016-06-17 Thread /dev/rob0
On Sun, Jun 12, 2016 at 02:45:17PM +, Wojtek Swiatek wrote:
> I am trying to find a way to forward a DNS request to a specifc DNS 
> server, based on the IP address of the requesting host.
> 
> In other words I would like dnsmasq to forward (as an example) 
> queries from the host 10.10.10.1's to DNS server 8.8.8.8 and when 
> the query comes from any another host - to 8.8.4.4.
> 
> Is this something achievable with dnsmasq? (I found a way to do it 
> based on the target domain, but this is not what I am looking for).

This would be trivial to do in BIND, using view and acl features.[1]

However, even there, it sounds quite strange.  Why do you need this?
If you're using dnsmasq in front of a BIND named with views, just go 
straight to the named.

[1]
acl eight { 10.10.10.1; };
acl four { any; };

view eight {
match-clients { eight; };
forwarders { 8.8.8.8; };
};
view four {
match-clients { four; };
forwarders { 8.8.4.4; };
};
-- 
  http://rob0.nodns4.us/
  Offlist GMX mail is seen only if "/dev/rob0" is in the Subject:

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] DHCP server on two interfaces - DNS on one interface

2016-06-17 Thread Allan Sorensen
Hello

I have successfully set up dnsmasq to serve two networks on two interfaces.
One is our internal network; one is a guest network. I would like the DNS
server part of dnsmasq to serve only the internal network so that dnsmasq
stops listening on port 53 on the guest network. Is this feasible?

(The guest network is a VLAN on the same physical interface as the internal
network; I don't think that matters for this question.)

Thanks in advance.

...Allan
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss