DnsMasq and OpenDNS as parental control

0

I'm trying to configure a Rasperry Pi to serve as Home DNS-Server and DHCP server using dnsmasq. Now all devices in the network (about 20) uses this DHCP and DNS server, and they get fix IPs and can resolve the names of each other. Works quite well

For my kids I setted OpenDNS Parental Control DNS as upstream DNS. But now all devices get this filtering DNS.

Is it possible to configure dnsmasq to send the Parental Control DNS IPs only to the devices of my kids, but not the rest?

Asturio

Posted 2017-12-26T20:49:20.393

Reputation: 101

1Peanut gallery, but BIND should be able to do this kind of things with views. – Anaksunaman – 2017-12-27T09:16:49.683

Bind would be to overkill for this, I think. In the documentation I didn't find anything the like. I was just playing with my thoughts. Maybe I can do this with 2 instance of dnsmasq and some IP-Tables rules. – Asturio – 2017-12-27T10:26:53.153

Answers

1

dnsmasq can do this with network tagging.

In dnsmasq.conf add the options:

dhcp-host=<hostname and/or mac>,192.168.0.50
dhcp-range=pc,192.168.0.50, 192.168.0.60
dhcp-option=pc,6,<opendns ip>

Ips in the range 192.168.0.50 - 192.168.0.60 will be given the Open DNS as its dns server.

You can not specifically configure the DNS server to forward differently depending on the network therefor you'd have to setup two separate forwarders if you also want your router to control DNS on the parental control hosts.

jdwolf

Posted 2017-12-26T20:49:20.393

Reputation: 1 974