I’m about to throw my entire Pihole out the window

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.

buzz,
@buzz@lemmy.world avatar

Personally I given up on pihole.
it’s just caused too many issues blocking sites that my family were using.
And then even for local DNS use case - I figured it makes no sense for me. I can just configure one of my real sub domains to resolve to local IP and be done with it.

No idea what specifically is your issue - but can’t you just connect the pihole to monitor and keyboard and look at the logs?

HamSwagwich,

I have up on Pihole a long time ago because of constant issues. Went with self hosted AdGuard and haven’t had a single issue since.

McBain,

Do you use ethernet to usb adapter?

PerogiBoi,
@PerogiBoi@lemmy.ca avatar

Built in wifi on the mobo

s_s,

Yeah…wifi.

Good luck!

sploosh,

Wifi is not for critical services, get that thing wired.

dingleberry,

I use eth, and random disconnects still happen. Switched to an SSD from an SD card, and it’s a bit more reliable now.

Bytemeister,

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

remer,
@remer@lemmy.ml avatar

This. I’ve always done dynamic IPs on my devices and set static IPs for them on my router. Never had an issue.

Bytemeister,

This is the way. Although, to clarify, you should assign static IPs on your DHCP server, which for most SOHO networks, that’s going to be your router.

If you assign statics on your hosts, your DHCP server will assign them the preferred address if available, but if it’s already assigned then the DHCP server is going to give your device the middle finger and assign them whatever the fuck it wants.

EncryptKeeper,

Not sure if I’m misunderstanding you, but the router/DHCP server doesn’t assign an IP at all to a host that you’ve assigned statically. Any given host can be statically assigned or use DHCP, not both.

The real problem with statically assigning IPs to hosts, is that your DHCP server won’t know that and could give a new device the same IP address as your statically assigned host, causing an IP conflict, if you statically assigned the host with an IP that’s inside the DHCP scope.

What you have to do is only assign static IPs that are outside the DHCP scope, or set all hosts to use DHCP and then use reservations in your DHCP server to make sure they get the same one each time.

Bytemeister,

Probably a bit of both to be honest. Thanks for clarifying.

bless,

For infrastructure critical services I recommend reservations on the DHCP server and then set static assignment on the device for the IP reserved in DHCP. This way if the device ever fails over to DHCP for any reason the IP will not change. I’ll usually also leave some small address space outside the DHCP scope available for static assignment if needed, usually at the front and usually around 20 IPs max as it’s easier to let DHCP do the heavy lifting.

Static IPs are important on infra critical devices if you ever find yourself in a situation where the DHCP services are not available, you don’t want them to be a single point of failure.

Just my 2 cents.

friend_of_satan, (edited )

deleted_by_author

  • Loading...
  • PerogiBoi, (edited )
    @PerogiBoi@lemmy.ca avatar

    That’s a good idea that I hadn’t considered. I’ll see if I can get Pihole running on an old android phone I have lying around.

    Edit: I now have PiHole running on an old Pixel 3a and have decommissioned my PiHole docker container on my home server.

    Gooey0210,

    My server and a raspberry are running adguard home

    Both have autoupdate with autoreboot. If I need to change something, connect, disconnected, everything will continue working

    nbafantest,

    I have a google router and It allows me to enter 2 DNS servers incase the first DNS Server doesnt work.

    stown,
    @stown@lemmy.world avatar

    That’s pretty standard for nearly every router and Internet connected device. There is almost always a setting for Primary and Secondary DNS servers. Sometimes you can even set more (ie. 2 IPv6 DNS servers in addition to the 2 IPv4 DNS servers)

    doodlebob,

    You should probably also sync them. I use orbital sync for this. github.com/mattwebbio/orbital-sync

    floofloof,

    Or gravity-sync. I use two Pi-holes with gravity-sync and it’s very reliable and effortless.

    Limit,

    I run pihole on a proxmox cluster (lxc containers), 2 separate IPs and I setup keepalived and made the virtual IP the primary dns ip that my dhcp server hands out, pihole1 is the master and pihole2 secondary. I use gravity sync to keep both piholes in sync. Works very well and I can reboot one at a time without losing dns at all. Techno tim on YouTube has a guide on how to setup keepalived on 2 pihole servers that helped me set it up.

    urquell,

    This is not an answer to the question at all

    Baahb,

    Yeah it is? There’s a reason your dns confutation has a backup IP address.

    urquell,

    That is true. But a simple service like dsn doesn’t go sideways every month usually. If he gets two of these services running, he just had double the trouble.

    d0ntpan1c,

    Not a solution to your current problem, but an alternative to consider depending on your network setup.

    I’ve been running unbound as my DNS via OPNSense. Same capabilities for blocklists, plus some nice privacy benefits with DoH/DoT. I think you can use unbound with pihole too, fwiw, i just don’t have a need for that.

    possiblylinux127,

    Your static IP probably isn’t set on the router

    ChaoticEntropy, (edited )
    @ChaoticEntropy@feddit.uk avatar

    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,
    @PerogiBoi@lemmy.ca avatar

    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 🤷

    ChaoticEntropy,
    @ChaoticEntropy@feddit.uk avatar

    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.

    deadbeef79000,

    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.

    notannpc,

    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 learn.microsoft.com/en-us/windows/wsl/networking#…

    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.

    ChaoticEntropy,
    @ChaoticEntropy@feddit.uk avatar

    I’m very happy with my little PiHole on a Pi Zero 2 W running DietPi, easy set up and then you can just forget about it apart from periodic updates. No issue with it being via WiFi either, which makes placing it much easier.

    possiblylinux127,

    Where does he mention wsl?

    notannpc,

    Down in a reply to some other comments lemmy.ca/comment/3915756

    I am horrified, but equally impressed 😂

    ChrislyBear,

    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:

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

    Solution is to add “denyinterfaces veth*” to the dhcpd.conf

    StopSpazzing,
    @StopSpazzing@lemmy.world avatar

    PuHole 🤣

    ChrislyBear,

    Hahaha! I’m keeping this typo 😂

    JustARegularNerd,

    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,

    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.

    seaQueue, (edited )
    @seaQueue@lemmy.world avatar

    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.

    pete_the_cat,

    For those that don’t know SLAAC is the “new DHCP” IPv6, I had to remember what it was.

    seaQueue, (edited )
    @seaQueue@lemmy.world avatar

    Yeah, SLAAC is stateless autoconfig for ipv6. It’s a little like DHCP in that the client gets an address automatically but it’s handled by the client machine rather than having a DHCP server running.

    SLAAC capable machines give themselves an address based on the ipv6 prefix advertised on the network then do a duplicate address check with all of the other devices to make sure they’re unique and away you go. There’s no central tracking of all dynamic addresses on the network segment, hence the stateless part of the name, but you can poll them with a neighbor request or broadcast ping when you want to see what’s there. The benefit is that basically everything you plug into your network probably supports SLAAC out of the box without needing to run server software anywhere to delegate addresses so new v6 clients just work without specific configuration.

    If the client supports it you can specify a SLAAC token that the machine will combine with the advertised network prefix rather than generating its own, which is how I have pihole showing up at ::253 as well as its DHCPv4 assigned …253. It’s a convenient configuration.

    I’d ignored SLAAC the first time around and given everything static v6 addresses without realizing that my provider would periodically change my prefix. That was fun to untangle, things worked if they made v4 requests but failed over v6 whenever my prefix changed so the failure mode appeared to be somewhat random depending on whether the service or application supported dual stack and was trying to connect over broken v6. Fun times.

    feminalpanda,

    How do you tell if your ISP has that?

    seaQueue,
    @seaQueue@lemmy.world avatar

    Check your router and see if you received an IPv6 delegated prefix along with your v6 address. Most of the major national home Internet providers in the US should support it now - if your provider supports ipv6 they’re probably giving you a delegated prefix.

    Usually you just enable ipv6 SLAAC + RA or “auto configuration” or something similar on the router and you’re done there.

    Once that’s working your router should broadcast route advertisements, turn “auto configuration”/SLAAC + RA/etc on on a client and see if it gets an ipv6 address. You use this instead of DHCPv6 so don’t mistake the two.

    Fiddle with the options after that, if a client supports a token you can give it something like “::DEAD:BEEF” to set its address to prefix::DEAD:BEEF.

    Beyond that Google “ipv6 SLAAC” and read about it and then read any ipv6 documentation for your software/devices.

    feminalpanda,

    Ooo ok, yea, I already have a delegated prefix from spectrum. I’ll look into SLAAC as this is the first time I saw that. Thanks.

    betz24,

    I haven’t done any research on pi-hole (I use firewalla) but is a raspberry Pi even powerful enough to support a small home network?

    What kind of CPU/RAM usage for a your unit normally have?

    deadcatbounce,
    @deadcatbounce@reddthat.com avatar

    Clue in name.

    seaQueue,
    @seaQueue@lemmy.world avatar

    I give my pihole container about 1GB of RAM and one core and it’s good to go (two cores helps with maintenance tasks though.) An entire RPi just to run pihole is such overkill.

    PerogiBoi,
    @PerogiBoi@lemmy.ca avatar

    Ya from my research raspberry pi is powerful enough to act as a DNS server for a home. I probs wouldn’t put a 4k plex library on it but it should do the job.

    In my case however I’m not running a raspberry pi. I have installed PiOS into Windows using WSL (like a lunatic) in an effort to not reformat my whole server computer and install something more practical (like Ubuntu server).

    Bizarroland,
    Bizarroland avatar

    I'm running a bare metal esxi server and one of the containers is running my pie hole and it is relatively Rock solid.

    I think the original poster should probably just set a Cron job to reboot the pihole every 3 days or so at like 3:00 in the morning and that would solve the problem.

    PerogiBoi,
    @PerogiBoi@lemmy.ca avatar

    That’s a decent idea for a workaround but I think I found my issue and have set my static IP address for my server to be outside my DHCP range. Here’s hoping it works. I’ll know in 90 days haha.

    watcher,

    My RPi4 is running PiHole, mailu and HomeAssisstant, without hickups.

    zygo_histo_morpheus,

    It’s not that much of a strain since it only handles DNS traffic.

    When you go to e.g. programming.dev, you computer needs to know the actual IP and not just domain name so it asks a DNS server and recieves an answer like 172.67.137.159 for example. The pihole will just route the traffic to a real DNS server if it’s a normal website or give a unkown ip kind of answer if it’s a blacklisted domain. Actually transmitting the website which is the bulk of trafic is handled without the piholes involvement.

    kadu,
    @kadu@lemmy.world avatar

    deleted_by_author

  • Loading...
  • SheeEttin,

    Can I add custom DNS forwarding rules to NextDNS? Because I need that for my internal network.

    manny_stillwagon,

    Sir, this is the @selfhosted community.

    redcalcium,

    I mean, it’s SelfHosted afterall.

    PerogiBoi,
    @PerogiBoi@lemmy.ca avatar

    Well in my case it’s due to me just not knowing that this other stuff exists and primarily wanting to Adblock with a piece of software that’s well known and well documented as I’m very noob at self hosting and networking 😛 I’ll have to take a look at those other services you’ve mentioned.

    Just fyi so you can hate me more, I’m running Pihole on Windows using WSL.

    kadu,
    @kadu@lemmy.world avatar

    deleted_by_author

  • Loading...
  • PerogiBoi,
    @PerogiBoi@lemmy.ca avatar

    All good I appreciate all the help and advice from the community here, even if some are politely telling me I’m an idiot lmao. Comes with technical communities so downvotes and the like don’t phase me (considering you can make a post, downvote yourself, then reliably start a downvote train even if there’s nothing wrong with the comment).

    ShortN0te,

    Simple: Privacy. The DNS Server of you choosing sees every single domain you are visiting.

    Having a own DNS Server allows you to hide varies queries from big DNS providers.

    Additional you gain shorter latencies for cached request if you have set it up right.

    AND when you have local services you probably have a horizon splitting DNS anyway so setting up a pihole vs something like DNSmasq is not much hassle anyway.

    kadu,
    @kadu@lemmy.world avatar

    deleted_by_author

  • Loading...
  • ShortN0te,

    Which is why NextDNS allows you to decide if DNS requests get logged or not, for how long, on which country, and with encryption.

    You have to trust that statement and company since you can’t verify it.

    Hardly relevant nowadays.

    With the hundreds of DNS requests that a modern websites requires, it is more relevant then ever. For browsing DNS latency is for more important then dowload or upload speed.

    nbafantest,

    Its literally a single docker compose up command and one time log in to your router and changing the DNS.

    You act like its some crazy complicated thing lol

    MigratingtoLemmy,

    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,

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

    MigratingtoLemmy,

    Basically, no static IPs at all. Lol

    fuzzy_feeling,

    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,

    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.

    PerogiBoi,
    @PerogiBoi@lemmy.ca avatar

    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,
    @c0mbatbag3l@lemmy.world avatar

    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.

    scott,
    @scott@lem.free.as avatar

    If you’re a computer geek (even a professional one) and struggle with IP addressing, you won’t be having much of a career.

    gingersneak,

    LMAO I know a whole bunch of people who don’t know a subnet mask from a hole in their ass and they’re doing just fine in their IT careers. You are overestimating the requirements for a great many corporate jobs.

    PerogiBoi,
    @PerogiBoi@lemmy.ca avatar

    Ya it’s me I’m the guy in IT who is currently confusing a subnet mask for my own ass.

    lightnegative,

    Just think of it as a routing optimisation that is only relevant for ipv4 networks.

    Router simple, router need to make decisions quick, quickest decision is made when can smush the subnet mask against an IP address and determine if the computer is on a local network so router can send traffic direct or is on other network so router needs to send traffic to other router

    scott,
    @scott@lem.free.as avatar

    There’s a difference between corporate IT and being a computer geek.

    I agree that many IT careers are relatively simple support jobs.

    They mentioned computer geeks which implies, to me, people who are deep into computers. In that light, if you’re struggling with concepts of IP addressing then the more-complicated facets of computers and networks will preclude you from an engineering role.

    griefreeze,

    Is this some kinda weird ass gatekeeping-esque computer geek thing? What you said is so wrong it’s not even funny.

    scott,
    @scott@lem.free.as avatar

    I’m not gate-keeping. I’m simply suggesting that IP addressing is one of the less-complicated things when it comes to computer-geekery.

    griefreeze,

    Nah you’re literally gatekeeping what it means to be a computer geek. maybe it’s not gatekeeping per se, but you sure are wrong and look like an ass

    scott,
    @scott@lem.free.as avatar

    I’m wrong? You’re saying that IP addressing is one of the most complicated things about computers/networking?

    griefreeze,

    I know reading is hard, but I’m not arguing that its a complicated task; merely that your familiarty with it does not at all reflect career prospects of a “computer geek.”

    eating3645,

    Give an alternative a go, see if you have better luck. There’s adguard home, blocky, and Technitium DNS for you to consider.

    Alternatively, the window trick should work.

    Andi,
    @Andi@feddit.uk avatar

    I had reliability issues with PiHole and moved to AdGuardHome a couple of years ago. It has never, ever crashed and the updates takes a couple of seconds. It rocks.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • selfhosted@lemmy.world
  • tacticalgear
  • DreamBathrooms
  • cisconetworking
  • Durango
  • mdbf
  • magazineikmin
  • ethstaker
  • osvaldo12
  • rosin
  • Youngstown
  • slotface
  • everett
  • kavyap
  • thenastyranch
  • JUstTest
  • ngwrru68w68
  • modclub
  • cubers
  • normalnudes
  • InstantRegret
  • GTA5RPClips
  • tester
  • khanakhh
  • provamag3
  • anitta
  • Leos
  • megavids
  • lostlight
  • All magazines