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?

  • 1
    Peanut gallery, but BIND should be able to do this kind of things with views. Dec 27, 2017 at 9:16
  • 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
    Dec 27, 2017 at 10:26

1 Answer 1


dnsmasq can do this with network tagging.

In dnsmasq.conf add the options:

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

Ips in the range - 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.