100

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 51 points 2 years ago* (last edited 2 years ago)

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 2 years ago

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

[-] fuzzy_feeling@programming.dev 20 points 2 years ago

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 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.

[-] MigratingtoLemmy@lemmy.world 7 points 2 years ago

Basically, no static IPs at all. Lol

[-] PerogiBoi@lemmy.ca 20 points 2 years ago

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 11 points 2 years ago

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 37 points 2 years ago

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

[-] PerogiBoi@lemmy.ca 7 points 2 years ago

My Pihole lives on my server computer and so the DNS is the same IP address as that computer

[-] whynotzoidberg@lemmy.world 33 points 2 years ago

Irrelevant, unless your pihole is running on your DHCP server. Does the server running pihole have a statically assigned IP that is within the DHCP range being assigned to other devices?

Static addresses should be outside of your DHCP range, ideally. If you can’t change the range, and assuming sequential handouts of IPs from your router among other things, you can try setting the server’s static IP to a bigger number.

[-] Xanthrax@lemmy.world 19 points 2 years ago

Are we getting a repeat of the guy who's wifi didn't work because of a smart bulb?

[-] RajaGila@feddit.nl 12 points 2 years ago

Wait, smart bulbs run rogue dhcp servers now?

[-] Xanthrax@lemmy.world 16 points 2 years ago

They're called too-smart bulbs, now.

[-] moody@lemmings.world 9 points 2 years ago

I assume the issue was the bulb was getting assigned by DHCP the same address that was supposed to be reserved for their PC, thus their wifi appearing not to work for their PC.

[-] PerogiBoi@lemmy.ca 7 points 2 years ago

Haha not quite. Sounds like an interesting post though. I’ll have to look that one up. From all the help given to me here though it looks like my “static” ip is within dhcp range so my router is giving everyone else my key to the castle and therefore invalidating my key.

[-] RajaGila@feddit.nl 7 points 2 years ago

Yea, duplicate IP addresses lead to some funny business. Toss a coin to see if a network packet will arrive basically.

The solution is to adjust the DHCP range or use static DHCP on the router. The latter just means that the router will assign the same IP to the specified computer every time.

load more comments (2 replies)
[-] ArbiterXero@lemmy.world 17 points 2 years ago

The static address should be assigned from the dhcp server.

Assigning a static address on the nic is a recipe for issues.

Set up a static assignment in your dhcp server.

[-] PerogiBoi@lemmy.ca 7 points 2 years ago

I’m not able to log into my router in order to edit any of my dhcp settings 😭 little caveat there.

[-] ArbiterXero@lemmy.world 22 points 2 years ago

Then that’s likely your issue.

Your router occasionally gives out the ip of your pihole to someone else, and everything shuts the bed.

Try picking x.x.x.254 as the pihole address or x.x.x.2

Often routers won’t use either the top end or low end of the available addresses.

The machines on your network that are dhcp, do they go below 100? Do they go above 200?

You’re going to be guessing a little here.

What is your “net mask”

[-] PerogiBoi@lemmy.ca 8 points 2 years ago

Ya I’m pretty sure you’re correct here and this is my issue. Since I’m not able to log into my router and define my dhcp range, I’ve picked an IP near the end of the range (254).

All my other devices are assigned .23, .25, etc.

Fun learning experience haha

[-] ArbiterXero@lemmy.world 7 points 2 years ago

Your ip-mask will tell you what IPs are accessible on the network

Likely goes nowhere because it’s probably 255.255.255.0 but it’s possible to be something else.

load more comments (2 replies)
load more comments (6 replies)
[-] PerogiBoi@lemmy.ca 10 points 2 years ago

Hm interesting. Basically my server is a windows computer (ya windows is not a good server OS I know, was lazy and experimenting) and in the windows network settings I assigned it a static IP that was within my DHCP range.

I wasn’t aware you could set it outside the range but this makes sense that it should be outside of the range so that my router doesn’t give my servers IP address to something else.

As you can tell I’m not super knowledgeable about networking but your help is making things make more sense. I appreciate it!

[-] NaibofTabr@infosec.pub 8 points 2 years ago
load more comments (4 replies)
[-] MangoPenguin 6 points 2 years ago

That definitely sounds like you've found the issue, hopefully changing the IP solves it!

[-] ChrislyBear@lemmy.world 30 points 2 years ago

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 2 years ago

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 2 years ago* (last edited 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.

[-] ChaoticEntropy@feddit.uk 26 points 2 years ago* (last edited 2 years ago)

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 2 years ago

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 8 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.

[-] ChaoticEntropy@feddit.uk 5 points 2 years 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 2 years ago

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

load more comments (5 replies)
[-] notannpc@lemmy.world 12 points 2 years ago

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)
[-] Sharpiemarker@feddit.de 11 points 2 years ago

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)
[-] possiblylinux127@lemmy.zip 10 points 2 years ago

Your static IP probably isn't set on the router

[-] Decronym@lemmy.decronym.xyz 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]

[-] seaQueue@lemmy.world 7 points 2 years ago* (last edited 2 years ago)

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 ›
this post was submitted on 11 Oct 2023
100 points (100.0% liked)

Selfhosted

57025 readers
1120 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.

  7. No low-effort posts. This is subjective and will largely be determined by the community member reports.

Resources:

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

Questions? DM the mods!

founded 2 years ago
MODERATORS