The issue I am facing:
My recently set up PiHole runs fine for a few hours, usually around a day.
After that, it stops working and the log contains a bunch of "no address range available for DHCP request via eth0" errors and I can no longer access the admin interface from any devices.
When I log into the PiHole directly and run "ip a" the eth0 interface no longer has the static IP I assigned to it.
So far the only way I've been able to resolve this is by swapping back to my router DHCP server, or rebooting my device.
Rebooting the device re-assigns the IP I gave it.
Details about my system:
Running Debian10 on a BeagleBone Black
Output from "ip a":
eth0: <BROADCAST,MULTICAST,DYNAMIC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 34:08:e1:c8:c0:28 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.190/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 2a00:23c6:4b34:1d01:3608:e1ff:fec8:c028/64 scope global dynamic mngtmpaddr
valid_lft 271sec preferred_lft 91sec
inet6 fe80::3608:e1ff:fec8:c028/64 scope link
valid_lft forever preferred_lft forever
Relevant settings in /etc/network/interfaces:
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.190
netmask 255.255.255.0
gateway 192.168.1.254 #network 192.168.1.254 #broadcast 192.168.1.255
More info:
Might be relevant, might not, I don't really understand how this works.
This will be the first time I've tried to fix it by just rebooting my device and not by swapping back to my router DHCP service.
The leases from my router are valid for 24 hours.
Not sure if that could have something to do with why my supposedly static IP is trying to refresh itself in the first place?
Lets take a look under the hood of your Pi-hole install.
Please upload a debug log and post just the token URL that is generated after the log is uploaded by running the following command from the Pi-hole host terminal:
It gives the network address range, however, you have already specifed it using netmask, (I should have read you post more thoroughly) so my reply is probably not valid.
Just as an update, it's now been well over 24 hours since the PiHole was last restarted.
So far there have been no issues.
No attempts by eth0 to request a new IP.
I didn't make any changes since posting the issue, so I'm inclined to believe it has been something to do with the 24hr lease from the router DHCP server.
I'd just like to bring it up on ANY post that mentions it. Your upstream DNS selection as Google.
If this is what you intend to run, this is not logical. You've taken lots of time to post here on the forum, and to also setup pi-hole. The only logical conclusion I can make is that you really care about privacy, or at the minimum, ad blocking.
Well, Google does neither of those. They don't respect your privacy, and they are an advertising company. It's not congruent to use an advertising company's DNS service, but then also block ads on your network.
I strongly suggest you use a different upstream DNS provider, if any of the above applies to the way you want to use the Internet.
Cloudflare is gigantic, and they have multiple ip addresses to choose from, my favorite being 1.0.0.3 which I think blocks both some ads, and malware domains.
Quad9 is also a great option, and respects your privacy. For some odd reason, Sony (I highly respect their smartphones as being root / romable from instruction's on Sony's own website!) are trying to sue Quad9 because of piracy.
That's just stupid, you can do the same thing with any other dns service, are they going to go after all of them?
I have Unbound set up so I can use my PiHole as my DNS provider.
However, given the issue with my PiHole dying every 24 hours or so, I wanted to limit the number of factors in troubleshooting. So I swapped to Google as a default in the meantime.
Once I'm comfortable that my PiHole setup isn't going to regularly stop working I will change the configuration back.
So with that cleared up do you have any suggestions around the issue I'm actually requesting help with?
Hey, I jumped in without really reading the rest of the thread, I won't do that anymore -- your setup is common when troubleshooting and I've done it a couple times.
On your Linux device, go to the network settings and disable IPv6. That should do it, also, you can say "no" as a value to IPv6 in the unbound config.
Hey, sorry if I haven't made it clear, but this issue was happening without having Unbound set as my DNS.
Quick summary:
I got pihole set up and working
I got Unbound set up and working
My PiHole started regularly "breaking" about a day after I set it up.
When checking the logs I would see multiple ""no address range available for DHCP request via eth0" errors at the time it lost function.
The first couple of times I was just switching back to using my router DHCP because my partner still needed use of the internet while I tried to fix things. I would switch back to PiHole and things would run fine again for another 24 hours, then break with the same error.
Trying to run "PiHole -r" with the PiHole set as the DNS when PiHole isn't working doesn't work for obvious reasons. So after the first few failures, I decided to stop using PiHole as the DNS until the issue was sorted.
This issue then still occurred while using Google DNS, so I don't think Unbound config is the issue.
I'd also just like to mention that I'm using a Linux install without the GUI. I also haven't used a Linux based OS for about 10 years, so I'm not familiar with the commands etc.
At this point the PiHole has been running for about 3 consecutive days. The only known difference being that this time I rebooted my PiHole device and got it running again without failing back to using my router DHCP.
I'm guessing that my router was somehow overriding the static IP?
The leases from my router are 24 hours by default, so as far as I can tell the PiHole was trying to assign itself a new one after the Router lease expired. I just don't understand why if the IP was asssigned on the device and supposed to be static.