this post was submitted on 11 Oct 2023
85 points (84.6% liked)

Selfhosted

40337 readers
452 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

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
[–] MigratingtoLemmy@lemmy.world 47 points 1 year ago* (last edited 1 year 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

[–] NaibofTabr@infosec.pub 40 points 1 year ago (2 children)

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

[–] fuzzy_feeling@programming.dev 19 points 1 year ago (1 children)

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.

[–] NaibofTabr@infosec.pub 10 points 1 year 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.

[–] MigratingtoLemmy@lemmy.world 7 points 1 year ago

Basically, no static IPs at all. Lol

[–] PerogiBoi@lemmy.ca 19 points 1 year ago (1 children)

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!

[–] c0mbatbag3l@lemmy.world 10 points 1 year ago (10 children)

It's alright, most computer geeks (even professional ones) can't even figure out how IP addressing works. That's why networking is its own sub group in enterprise environments.

load more comments (10 replies)
[–] Dhar@lemmy.ca 38 points 1 year ago (33 children)

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

load more comments (33 replies)
[–] ChrislyBear@lemmy.world 29 points 1 year 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

[–] JustARegularNerd@aussie.zone 11 points 1 year ago (1 children)

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.

[–] ChrislyBear@lemmy.world 7 points 1 year ago* (last edited 1 year 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.

[–] StopSpazzing@lemmy.world 9 points 1 year ago (1 children)
[–] ChrislyBear@lemmy.world 5 points 1 year ago

Hahaha! I'm keeping this typo 😂

[–] ChaoticEntropy@feddit.uk 25 points 1 year ago* (last edited 1 year ago) (1 children)

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.

[–] PerogiBoi@lemmy.ca 6 points 1 year 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 🤷

[–] deadbeef79000@lemmy.nz 7 points 1 year 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.

[–] ChaoticEntropy@feddit.uk 5 points 1 year ago

As long as the router has the IP explicitly reserved for the device your PiHole is running off of then it won't be reassigned.

[–] Bytemeister@lemmy.world 13 points 1 year ago (5 children)

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

load more comments (5 replies)
[–] Sharpiemarker@feddit.de 12 points 1 year 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.

load more comments (8 replies)
[–] notannpc@lemmy.world 11 points 1 year 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.

load more comments (3 replies)
[–] possiblylinux127@lemmy.zip 9 points 1 year ago

Your static IP probably isn't set on the router

[–] Decronym@lemmy.decronym.xyz 7 points 1 year ago* (last edited 1 year 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]

[–] seaQueue@lemmy.world 7 points 1 year ago* (last edited 1 year ago) (5 children)

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.

load more comments (5 replies)
load more comments
view more: next ›