Network with Pi-hole activated, not working properly

Expected Behaviour:

I have installed Pi-Hole on a Raspbian GNU/Linux 10 (buster) system, running on a Raspberry Pi 4. I installed everything carefully following online instructions, without really knowing what I'm doing... but I've managed to get everything working, and i even managed to get Kodi working on the same Raspberry pi machine. My router is D-Link DIR-825ACG1.

Actual Behaviour:

Last week something got messed up, don't know why and how, but this is what happened. I was away from my house for a long weekend, so I disconnected all the electrical appliances, including the Pi and the router. When I re-connected everything, I couldn't get the internet working on my wi-fi network.
When I re-enabled the DHCP server on my router and disconnected the Pi from the network, the internet connection started working as expected again, obviously without the Pi-hole blocking ads etc.

Another thing that happened, is that the Raspberry Pi can't connect to the internet. Obviously I try that when the Pi is connected directly to the router with a cable. I can access the router's admin panel or the pi-hole admin interface through the Pi's browser, but can't access any other pages. Kodi is also not connecting to the internet, and another indication is that the Pi's system clock can't sync with an online server as before.
Currently I disabled the Pi-hole's DHCP server through the web interface, and re-enabled the DHCP service on the router.

Debug Token:

I've put the text here -

Mind you - the time stamp is wrong, because, as I mentioned, the Pi can't sync to a time server and shows the wrong time and date

That's likely the root cause of your issue.

Try setting your time manually, e.g. by

timedatectl set-time '2021-05-14 17:00:00'

Substitute your current local date and time as applicable.

I had a similar problem happen to me so I hope this will help, I found that if you boot the PI first before the router it wouldn't connect to the internet, the DHCP wouldn't work, and my devices could not get IPs ( this was a consistent problem, if the router booted up after or at the same time it would not work)

What fixed my instance of this problem was to always turn the router on first, wait for it to finish booting up completely ( depending on your model this can take a while ) then turn the PI on, when I did that things worked.
It's worth a quick try, that's all I got.

Thank you for your reply Austin5646. It seems like a logical solution - I tried that, but unfortunately, it didn't work.

As you suggested, I turned off the Pi, disabled the DHCP on the router, turned the router off, rebooted the router. and when it finished rebooting, I turned on the Raspberry Pi.
The results were the same as when the problem first appeared - the devices which are connected to D-Link router seemed to be connected to the internet, while all the wi-fi connected devices had no internet access. The Pi itself was also not able to connect to the internet.

I think that I'll have to reformat the Pi and start from scratch.

Thank you Buckinig_Horn - my guess is that the wrong system time is a symptom of the problem, not the problem itself.
I tried setting the clock manually as you suggested, but got an error message, saying that I can't do that. because the clock is set to be synced automatically to to an online server.
I couldn't find where to change that.

Generally, accessing the man pages for a command (e.g. man timdedatectl) will often help if you don't know or remember a command.

Either use:

timedatectl set-ntp true

before running the command, and run with set-ntp false after.

Alternatively, use:

sudo date -s '2021-05-17 09:00:00'


I don't think that's necessary - just set the correct time.

1 Like

An additional comment from me: Check also the set timezone. Many [many!]users still use the default en-GB timezone even if this is inappropriate in their case. NTP will still work fine because it will just set the en-GB time and everything is consistent. However, when you are in the US, have en-GB timezone and then set the device clock from wallclock time, several hours of displacement will happen and the time will be incorrect without this being very obvious.

To change timezone for APT based systems:

sudo dpkg-reconfigure tzdata

And best to reboot if change TZ to get all processes on track.

This actually solved the problem.
I was skeptic and I was wrong...
I used this:

.. and it worked like a charm.
Thank you so much for your help!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.