Using pihole for DNS without loosing local DNS

I am running pihole on IP 192.168.1.2. My computers DNS IP has been set to the IP of the pihole (192.168.1.2) and therfore web content filtering is working well. However, DNS is not working for local server names on my windows network. For example if I ping ‘fileserver’ it’s not found. So how can I force clients to get content filtering through the pihole but still allow local dns to work?

Two options:

  • Instead of pointing clients to pihole, leave them as default and configure your router to use pihole for DNS. This way you still get local hostname DNS while other DNS requests will be handled with pihole.

  • Add entries for your local servers (i.e. fileserver) in pihole’s local DNS configuration so their hostnames will be resolved.

Personally I would go the other way. I would setup your DHCP servers to point to the pihole and then set your router as the upstream DNS from the pihole.

Client → Pihole DNS → Router DNS

1 Like

If you have windows server setup, then the clients dns needs to be windows dns server (normally on the domain controller)

Within DNS, setup forwarder to your pi hole

Yup, this is how I would do it. Local DNS is authoritative to the local domain, and it forwards to pihole for all inquiries that it doesn’t handle. This is how my system is set up and seems to work just fine, exception being not running pihole, running e2guardian for the filtering. Same affect, different tools.