Every month or so all my devices lose internet and the only way to connect them all back is to disconnect them from the DNS server that Pihole is running.

I set my Pihole to have a static IP but for some reason after around a month or maybe longer, it just fails. This has happened 4 times over the last while and the only fix is to essentially uninstall everything on my Pihole, disable it, and then reconfigure it from scratch again.

I’m not sure what’s going on so any help would be appreciated.

top 50 comments

sorted by: hot top controversial new old
[–] 47 points 2 years ago* (2 children)

If you can't access your server and your router's web interface, that's a subnetting/DHCP allocation issue. Nothing to do with Pi-Hole.

For reference, there's 2 ways to allocate static addresses to devices:

  1. Define DHCP range, and configure the application to use a static address outside of the allocation pool.
  2. Give out static addresses by MAC.

"Skill issue bro" /s

  • source
  • hideshow 4 child comments
  • [–] 41 points 2 years ago (2 children)

    A 30 day DHCP lease expiration would explain OP's issue.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 20 points 2 years ago (1 child)

    I vote for 60 day lease time, iirc the clients try to get a new lease when half of the time is over, so they can keep the ip.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 9 points 2 years ago

    Maybe, but I suspect it's working like this:

    • Pi boots then requests locally configured IP from DHCP server
    • DHCP server grants 30 day lease for requested IP
    • Pihole runs fine for awhile, DNS requests are properly handled
    • IP lease expires, DHCP server returns IP to available address pool but doesn't reassign it to anything yet
    • time passes
    • Random wireless device connects to router, DHCP server assigns IP to new device
    • DNS requests to Pihole fail because the IP was assigned to the recently connected wireless device

    This would explain why Pihole appears to cause problems every month, sometimes a little longer.

  • source
  • parent
  • [–] [S] 20 points 2 years ago (1 child)

    Definitely a skill issue haha. I’m brand new to this stuff so I’m trying to learn as fast as possible. Appreciate the help and the explanations!

  • source
  • parent
  • hideshow 2 child comments
  • [–] 38 points 2 years ago (33 children)

    First thought: Is your PiHole's static IP within the range of addresses your DHCP server hands out?

  • source
  • hideshow 33 child comments
  • load more comments (33 replies)
    [+] 38 points 2 years ago* (last edited 2 years ago) (6 children)
  • load more comments (4 replies)
    [–] 30 points 2 years ago (2 children)

    Do you run your PiHole on top of Docker? There's an issue with docker and Raspberry Pis which makes the network crap out periodically. So if your PuHole becomes unavailable until you restart your Pi it might be this:

    https://github.com/raspberrypi/linux/issues/4092/

    Solution is to add "denyinterfaces veth*" to the dhcpd.conf

  • source
  • hideshow 4 child comments
  • [–] 10 points 2 years ago (1 child)

    Oh my gosh. I have been trying to figure this issue out with my docker containers for months. If this is the fix, THANK YOU.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 6 points 2 years ago*

    I have had this issue for about a year, while trying different monitoring and logging solutions to try and find out what's going on.

    This was such a bitch! Now I'm spreading the word, so that other won't suffer as long as I have.

  • source
  • parent
  • [–] 24 points 2 years ago* (last edited 2 years ago) (1 child)

    My first thought on this was immediately "did you also reserve that static IP address on your router to make sure it remains assigned". From what I've read that does seem to be the issue, so that's a little validating.

  • source
  • hideshow 2 child comments
  • [–] [S] 6 points 2 years ago (2 children)

    I managed to get into my router and my Pihole server shows up as static and I’ve assigned it an address at the higher end of the DHCP range so we’ll see when the lease expire 🤷

  • source
  • parent
  • hideshow 4 child comments
  • [–] 6 points 2 years ago

    Don't set the static IP within the DHCP range (well you can, but it then depends on how smart your dhcp server is, just avoid the situation).

    You run a risk of the same IP being assigned to another device.

  • source
  • parent
  • [–] 12 points 2 years ago (8 children)

    Taking a look at your Pihole logs is going to be helpful. Also knowing what kind of device is running the Pihole software may also help.

    I had Pihole running on a raspberry pi 3 years ago, and I had pretty consistent issues. I've run it on other hardware since without a problem.

    It could be an issue with the SD card, if you're using a raspberry pi. I've also read that the log file can grow large enough to cause issues with your Pihole instance.

    So there are a number of possibilities.

  • source
  • hideshow 8 child comments
  • load more comments (8 replies)
    [–] 11 points 2 years ago (3 children)

    I would HIGHLY recommend that for something as essential as DNS, you should be running it on its own hardware. Considering, as you’ve experienced, that any issues result in a complete loss of normal access to the internet.

    You can run pihole on something as small as a Raspberry Pi zero w, then just set it with a static IP and forget about it.

    Considering you said you’re currently using WSL I suspect there is an extra layer of networking bullshit that is breaking your routing. If you haven’t already looked at this document, it might have the information you need https://learn.microsoft.com/en-us/windows/wsl/networking#accessing-windows-networking-apps-from-linux-host-ip

    But for the sake of stable DNS services you will thank yourself for just getting a dedicated device of any power level to ONLY handle DNS.

  • source
  • hideshow 3 child comments
  • load more comments (3 replies)
    [–] 10 points 2 years ago (1 child)

    Are you assigning the static address on your pi, or are you assigning a static address on the router?

  • source
  • hideshow 1 child comment
  • load more comments (1 reply)
    [–] 8 points 2 years ago

    Your static IP probably isn't set on the router

  • source
  • [–] [B] 7 points 2 years ago* (last edited 2 years ago)

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

    Fewer Letters More Letters
    CGNAT Carrier-Grade NAT
    DNS Domain Name Service/System
    HA Home Assistant automation software
    ~ High Availability
    IP Internet Protocol
    NAS Network-Attached Storage
    NAT Network Address Translation
    PiHole Network-wide ad-blocker (DNS sinkhole)
    RPi Raspberry Pi brand of SBC
    SBC Single-Board Computer
    SSD Solid State Drive mass storage
    SSH Secure Shell for remote terminal access

    10 acronyms in this thread; the most compressed thread commented on today has 12 acronyms.

    [Thread #209 for this sub, first seen 11th Oct 2023, 11:55] [FAQ] [Full list] [Contact] [Source code]

  • source
  • [–] 7 points 2 years ago* (last edited 2 years ago) (1 child)

    I had similar issues when SLAAC wasn't properly configured for my network. Every however many days my ISP forced a modem reboot and if the delegated prefix happened to change I'd start having pihole problems. I finally tracked that down, made sure SLAAC was working everywhere and assigned my pihole container a SLAAC token so its address relative to everything else on the network didn't change and I'm good to go. These days the pihole is always ...253 and ::253.

  • source
  • hideshow 2 child comments
  • load more comments
    view more: next ›