Router overrides Pi-hole after WAN IP refresh

I just recently set up a Pi-hole sinkhole and got everything working nicely. I configured Pi-hole as the primary DNS server in the router settings. However, from the web interface I noticed that query logs seemed to always end to previous day at 11 PM with PTR type requests to 8.8.4.4 and 8.8.8.8. At first I didn't think too much about it, but as this happened everyday I started looking into it. So, it seems that my router for some reason overrides the set Pi-hole IP with my ISP's own DNS server IPs everytime the global IP of the router expires. The router changes back to Pi-hole as DNS server when I reboot the router.

Any suggestion how to fix this? The settings of the router are a bit vague.

My router is Sagemcom F@ST 3686 with ISP customized firmware.

TL;DR: router ignores Pi-hole as DNS when it fetches a new WAN IP as old one expires.

I would recommend setting the PiHole as your DHCP server, my router wouldn't even use the DNS I provided so that's what I ended up having to do. ( I have SagecomF@ST 5260 ) I'd recommend this over diagnosing weird router behavior but it's up to you

To do that you have to:

  • Make sure your PiHole has a static IP configured in /etc/dhcpcd.conf
  • Enable DHCP in the Pihole settings -> DHCP tab
  • Disable your routers DHCP server ( likely under the DHCP tab there )
  • ( if you turned your Raspberry PIs firewall on you might have to open some ports )

You can find more info here

2 Likes

That did it! I didn't realize Pi-hole can handle the local DHCP service itself and doesn't need to be configured into the router other than turning its' own DHCP service off. Many thanks!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.