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

Selfhosted

39980 readers
781 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.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 1 year ago (1 children)

How do you set the static IP for the pi? From your router's DHCP server, or from pi's network configuration?

[–] [email protected] 1 points 1 year ago (3 children)

I set it directly on the computer hosting Pi since my router doesn’t let me log into it.

[–] [email protected] 12 points 1 year ago (1 children)

Do you know if your router is acting as a DHCP server? Most do, and if you’ve set up the Pi as one without logging in and turning off your router’s, you’ve set up two conflicting DHCP servers, and that would explain your issues.

[–] [email protected] 2 points 1 year ago (4 children)

I’m assuming my router is acting like a DHCP server as it’s all on default settings and my other devices are handed an IP address something like 192.168.5.xx

I’m not able to log into my router anymore (tried all the ways: 192.168.2.1, 1.2, 5.1, etc) so you’re probably correct that with both dhcp servers up and running they’re probably conflicting.

[–] [email protected] 4 points 1 year ago (1 children)

With Pihole off, look for your gateway address. That will be your router address. Are you using windows on your usual pc? Ipconfig command should show you your gateway, easily.

Then tap that into your browser to log in to your router and deactivate dhcp from it.

[–] [email protected] 3 points 1 year ago (1 children)

Ya that was something I tried initially, looking up the default gateway using ipconfig and then trying that address.

It didn’t work before but maybe this time I’ll try again, ensuring that piholes not running.

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (1 children)
[–] [email protected] 2 points 1 year ago

Tried both. Usually http:// is the one that works for me for my other services on different ports. It’s very likely a conflict with my routers dhcp 🙃

[–] [email protected] 4 points 1 year ago (1 children)

I just want to reiterate what others have said: do some googling about your router make and model. Look for the instructions for “hard reset” or “factory reset”. Follow those instructions. Once you do, you should be able to find the default login online.

Once you’re able to log into your router, I’d suggest keeping it as your DHCP server and simply following the instructions to set up a pihole with it. Everything seems to work more smoothly without the pihole as DHCP server.

[–] [email protected] 3 points 1 year ago (1 children)

Ya a factory resets pretty much the only thing I haven’t tried yet and it’s simply because I don’t want to have to reset up all my lights and smart devices but I fear that might need to happen.

I don’t think I have my Pihole set up to by my dhcp server, just my dns

[–] [email protected] 7 points 1 year ago (1 children)

You can avoid that by using the same Wi-Fi network name and password that your current network uses. Your devices won’t know the difference.

[–] [email protected] 3 points 1 year ago (1 children)
[–] [email protected] 3 points 1 year ago (1 children)

Good luck. I literally went through something similar a few weeks ago. It took a little time but my entire network runs better now. You got this!

[–] [email protected] 2 points 1 year ago

Thank ya! Networking is very confusing for me and I’ve been tinkering on windows and Linux machines for decades 🤪 always something to learn

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (2 children)

Plug a pc straight into the router and do an ipconfig /all. It will tell you the router gateway if you don't have a static ip. Go to the gateway ip and turn off dhcp.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

Then go to your server dhcp and put a dhcp exclusion for the pi hole ip and anything else you have static'ed

[–] [email protected] 1 points 1 year ago

This doesn’t work for me unfortunately :/ I suspect my router needs a factory reset since I’m not able to log into it at all

[–] [email protected] 3 points 1 year ago (1 children)

The fact you're not able to log into your router is the first problem you need to solve here. If you're having network issues, the router is always the first thing that needs to be working perfectly. Otherwise whatever else is going on is probably being affected by the router in some way.

What you're doing right now is sort of like saying "Hey, does anyone know how to get this bad smell out of my car? Nothing I do seems to work. Oh, BTW, the engine is on fire, it's been like that for a while, I don't know how to put it out. Anyway, so the thing with this smell is..."

[–] [email protected] 1 points 1 year ago

My take was that there was some corrupted setting that wouldn’t let me access the router as I’m having no other network issues but you’re right in that I wouldn’t have any of these issues if I could just log into the router and actually properly set a static IP.

Figured I’d ask the void if they recognized the smell since there are people much smarter than me out there

[–] [email protected] 9 points 1 year ago (1 children)

There is a chance that the dhcp server on your router actually hand out the same ip address to other client, causing the pi to become inaccessible due to ip address conflict. Assigning the static ip address from the router will prevent this issue.

If your router is from your ISP, maybe you can ask them to give you access to the lan configuration options. ISP routers usually have two accounts, the full admin account which usually aren't handed out to their subscribers, and a user account that would let their subscriber configure various lan settings.

[–] [email protected] -2 points 1 year ago (1 children)

At one point my router would let me log into it using its IP address but now it does not let me no matter what IP I type.

This all would have been much simpler had I been able to log in and set a static IP on my home server from there and disabled DHCP 🤪

[–] [email protected] 3 points 1 year ago (1 children)

What's the router's brand and model? Googling it might give you the answer. The administrative page for the router might be hosted on custom ports instead of port 80.

[–] [email protected] 1 points 1 year ago (1 children)

Yeah I tried doing that initially. It’s a Bell Homehub3000 and all the login addresses suggested online that I tried were no dice. I probably have to factory reset the router but that would mean redoing my entire smarthome and IOT setup which I’m really not looking to do 😅

[–] [email protected] 4 points 1 year ago (1 children)

That's suck. I actually had similar issues where the router's login page would refuse to log me in, even though I actually can login to the router using SSH. No other fix but to reset the router and start again, but time I export the router's settings (most router has settings import/export feature) after I got everything setup so I don't have to do it from scratch when the router crap out again.

[–] [email protected] 1 points 1 year ago

For me it’s as if there is no router login page which is kiiiiiilling me haha. All of my silly issues would be gone if I could just set a hard static IP for my server 😄

[–] doctorn 2 points 1 year ago (1 children)

I have a 5G CGNAT ISP router, but distanced myself from it by adding my own full access router connected via a LAN cable to my ISP one and using its wifi instead of the ISP's wifi. This prevents the ISP router from stealing IP addresses (it can literally do whatever it wants to its IP ranges as long as it feeds internet through the LAN cable), and gives me full control over local network IP addresses (as I also am not provided any login to the ISP router).

Might be an extra NAT, but that kinda becomes moot being behind CGNAT that can't open external ports anyway.

[–] [email protected] 1 points 1 year ago (1 children)

I used to do something similar by having another router and my main one in bridging mode but this new router from my ISP seems to be idiot proof and won’t let me access the login screen. A factory reset is in my future I think.

[–] [email protected] 1 points 1 year ago

What model is the router?