I'd like to use dnsmasq to set up a white list for certain clients on my network.
For instance, I'd like to have these rules for clients in the range 192.168.1.10 - 192.168.1.20:
no-resolv server=/pbskids.org/192.168.0.1 server=/disney.go.com/192.168.0.1
This way, the only websites accessible from these clients are the ones that are whitelisted. Clients on the network outside of that range should be able to use whatever DNS server they want. How can I do this?
This is what I have in dnsmasq.conf so far:
bogus-priv domain-needed no-resolv server=/pbskids.org/192.168.0.1 server=/disney.go.com/192.168.0.1
This has the intended result of denying upstream DNS lookups to all clients on the network. Now what I need is a way to allow certain clients to use upstream DNS instead. I don't think an option like this exists but maybe it will help get my idea across:
use-resolv --source 192.168.1.150
i.e., if the client's IP address is 192.168.1.150 then use upstream DNS servers. Alternatively, what I was originally looking for was something like this:
no-resolv --source 192.168.1.100
i.e., if the client's IP address is 192.168.1.100 then don't use upstream servers at all. I hope this helps clarify my question.
If I can't do something like this, then maybe what I need is two separate networks.