On Wed, Oct 10, 2012 at 10:01:51AM -0300, Cyro Wicks wrote:
> I have a firewall and dns server for my entire network, and what
> i would like to do is to have dnsmasq to read /etc/hosts_net1
> or /etc/hosts_net2 based on the network address coming from
> net1 or net2.
>
> I am trying to implement an internet filtering based on dnsmasq, 
> but i would like to have net1 users and net2 users with different 
> dns block rules defined on /etc/hosts_net1 and /etc/hosts_net2 
> files!
> 
> Is it possible with dnsmasq?

Not the way you are describing it, but the exact functionality you 
want is implemented. See "-y, --localise-queries" in the man page. 
You can use alternate hosts files if desired for some reason, but 
there's no need; queries would be answered with the address local to 
the querying client.

Well, to be precise, you did not say exactly what kind of data you 
want to provide the net1/net2 clients, so this might not be what 
you're wanting. I just guessed that you wanted to provide addresses 
local to net1 or net2. If you are wanting to provide random data, I 
am not sure if dnsmasq can do that. You might need BIND named(8)'s 
"view" feature.

A dnsmasq-based solution in that case might be to run multiple 
instances. See "-i, --interface" and "-I, --except-interface" and 
"-z, --bind-interfaces".
-- 
  http://rob0.nodns4.us/ -- system administration and consulting
  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

Reply via email to