Page 1 of 1

Make LAN clients to use a separate DNS server

Posted: Mon Dec 07, 2020 12:33 pm
by lollapalooza
I'm experimenting with Pi-hole.
The DNS server is installed on 192.168.0.5.
Gargoyle router is 192.168.0.1.

In order to have Pi-hole effective for all the clients, I'd like to set the router in order to use 192.168.0.5 as DNS server, instead of OpenDNS.

When I add 192.168.0.5 in the configuration (connection -> basic -> local network -> DNS servers), all the clients stop working.

I have the feeling that Gargoyle can use only external DNS servers.

Is there a way to fix this?

As an alternative, is there a way to "push" the DNS server 192.168.0.5 to the clients via DHCP (instead of 192.168.0.1)?

Re: Make LAN clients to use a separate DNS server

Posted: Mon Dec 07, 2020 4:16 pm
by Lantis
Turn off force clients to use router dns and try again

Re: Make LAN clients to use a separate DNS server

Posted: Mon Dec 07, 2020 5:19 pm
by lollapalooza
Same issue :-(
As soon as I set 192.168.0.5 as DNS server, all the client stop working.

And still I see the client pointing to 192.168.0.1 as DNS server.

Re: Make LAN clients to use a separate DNS server

Posted: Mon Dec 07, 2020 5:38 pm
by RomanHK
:idea: Maybe implement a DNS loop there. Set up a manual DNS server on Pi-hole other than on the router.

Or you can try setting the DHCP server to delegate its own DNS server using setting 6: viewtopic.php?f=5&p=57829#p57829

Re: Make LAN clients to use a separate DNS server

Posted: Mon Dec 07, 2020 6:40 pm
by Lantis
have you checked that the PiHole is working correctly?

When you set the IP of the Pi in Gargoyle, you're asking Gargoyle to use it as the DNS server.
Your clients will still use Gargoyle for their DNS

Client -> Gargoyle -> Pi -> Internet
Internet -> Pi -> Gargoyle -> Client

If you turn on "Force clients to use router DNS", you get
Client -> Gargoyle -> Pi -> Gargoyle -> Pi -> Gargoyle -> Pi ...

As long as that setting is off, it should work fine, which generally points to an issue elsewhere.

Re: Make LAN clients to use a separate DNS server

Posted: Tue Dec 08, 2020 3:25 am
by lollapalooza
Yes, PiHole works correctly.
At the end I followed RomanHK suggestion, by adding the DHCP option 6 to /etc/dnsmasq.conf

And I obviously had to remove "Force Clients To Use Router DNS Servers".

Thank you!