this post was submitted on 11 Oct 2023
0 points (NaN% liked)

Selfhosted

54761 readers
359 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
 

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 18 comments
sorted by: hot top controversial new old
[–] ChrislyBear@lemmy.world 1 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

[–] ChaoticEntropy@feddit.uk 1 points 2 years ago* (last edited 2 years 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 0 points 2 years ago (1 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 1 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.

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

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

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

[–] fuzzy_feeling@programming.dev 1 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.

[–] PerogiBoi@lemmy.ca 1 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!

[–] Dhar@lemmy.ca 0 points 2 years ago (1 children)

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

[–] PerogiBoi@lemmy.ca 0 points 2 years ago (1 children)

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

[–] whynotzoidberg@lemmy.world 0 points 2 years ago (2 children)

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.

[–] ArbiterXero@lemmy.world 1 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.

[–] Xanthrax@lemmy.world 1 points 2 years ago (1 children)

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

[–] RajaGila@feddit.nl 1 points 2 years ago (3 children)

Wait, smart bulbs run rogue dhcp servers now?

[–] moody@lemmings.world 1 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.

[–] Xanthrax@lemmy.world 1 points 2 years ago

They're called too-smart bulbs, now.

[–] PerogiBoi@lemmy.ca 0 points 2 years ago (1 children)

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