Setting up Pi-hole

The ./interfaces is a file. It sounds like /etc/systemd/network/99-default.link is the one you're after. What's the content? You can use cat to print its contents. Also what's the output of systemctl status systemd-networkd?
If I type 'cat /etc/systemd/network/99-default.link' into Putty nothing happens, just another line in the command prompt.

systemctl status systemd-networkd results in....
Code:
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; pr>
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
lines 1-6/6 (END)...skipping...
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; pr>
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
...skipping...
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; pr>
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
...skipping...
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; pr>
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
set mark: ...skipping...
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; pr>
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
...skipping...
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; pr>
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
...skipping...
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; pr>
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
...skipping...
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; pr>
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
...skipping...
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; pr>
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
set mark: ...skipping...
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; pr>
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
...skipping...
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; pr>
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
...skipping...
○ systemd-networkd.service - Network Configuration
     Loaded: loaded (/lib/systemd/system/systemd-networkd.service; disabled; pr>
     Active: inactive (dead)
TriggeredBy: ○ systemd-networkd.socket
       Docs: man:systemd-networkd.service(8)
             man:org.freedesktop.network1(5)
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
Log file is already in use  (press RETURN)
 
I'm remembering correctly that you are running RasPi OS Lite (Bookworm), yes? I haven't run ROS in years, I ran FreeBSD for a long while then moved to AlmaLinux. Having just searched it up, it seems after deprecating dhcpcd in Bullseye, they (Raspberry Pi Foundation) moved to a weird mix of Netplan and NetworkManager. There's a YAML on the /boot that can init the network using NM via Netplan, but it's all very unnecessarily complicated and convoluted. You could just set up systemd-networkd and disable everything else, or just set up a static IP via nmtui (graphical in console) or nmcli. Just to confirm, what's the output of systemctl status NetworkManager?
 
Honestly, I would run:

Code:
cat /etc/os-release

This will tell us which exact distro/version you're on

For example I am running bookworm for the majority of my Linux servers:

Code:
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm

and I have had to use /etc/network/interfaces with the minimal netinst most things use. This is the output for a VM, so ignore the vmbr interface yours will be different if it's physical.

Code:
cat /etc/network/interfaces
auto lo
iface lo inet loopback

iface enp1s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.1.104/24
        gateway 192.168.1.1
        bridge-ports enp1s0
        bridge-stp off
        bridge-fd 0
 
Honestly, I would run:

Code:
cat /etc/os-release

This will tell us which exact distro/version you're on

For example I am running bookworm for the majority of my Linux servers:

Code:
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm

and I have had to use /etc/network/interfaces with the minimal netinst most things use. This is the output for a VM, so ignore the vmbr interface yours will be different if it's physical.

Code:
cat /etc/network/interfaces
auto lo
iface lo inet loopback

iface enp1s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.1.104/24
        gateway 192.168.1.1
        bridge-ports enp1s0
        bridge-stp off
        bridge-fd 0
cat /etc/os-release returns:
Code:
marc@pi-hole:~ $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm

cat /etc/network/interfaces returns "No such file or directory".
 
Code:
marc@pi-hole:~ $ systemctl status networkmanager
Unit networkmanager.service could not be found.
marc@pi-hole:~ $ system status NetworkManager
-bash: system: command not found
 
Code:
marc@pi-hole:~ $ systemctl status networkmanager
Unit networkmanager.service could not be found.
marc@pi-hole:~ $ system status NetworkManager
-bash: system: command not found
So you're not using NetworkManager, systemd-networkd or ifupd? Have you tried systemctl status networking?
 
What about NetPlan? Try netplan status as root. Does raspi-config work? You should be able to set a static IP from there.
netplan status is not found even if I do sudo netplan status. sudo raspi-config does work but I have gone through the menus and can't see anywhere to set IP. However I googled this and found this link https://pimylifeup.com/raspberry-pi-static-ip-address/. I can see how to set an IP address there so I'll do that later on.
 
netplan status is not found even if I do sudo netplan status. sudo raspi-config does work but I have gone through the menus and can't see anywhere to set IP. However I googled this and found this link https://pimylifeup.com/raspberry-pi-static-ip-address/. I can see how to set an IP address there so I'll do that later on.
That depends on NetworkManager though, which is something you say isn't on your system. You don't have NetworkManager, ifupd/networking, systemd-networkd, Netplan... It's not really possible. Something's borked, or you've missed something. :confused:
 
That depends on NetworkManager though, which is something you say isn't on your system. You don't have NetworkManager, ifupd/networking, systemd-networkd, Netplan... It's not really possible. Something's borked, or you've missed something. :confused:
Dunno what's going on either. I might just back the settings up next weekend, re-run the installation and set a static IP address there of 192.168.0.2, remove the reservation in my router and tell the new Pi-Hole instance to DHCP from 192.168.0.3 onwards/upwards.
 
Weird one for me with PiHole running directly on a Rpi5:

DHCP disabled on router, as it’s Virgin and you can’t change DNS for clients

PiHole serving DHCP and with default blocklist

I’ve got a FireAngel gateway that links connected smoke alarms etc to app and online. When you power up the gateway, it gets an address normally from DHCP… on refresh during lease though, it won’t take the DHCP address and drops itself offline!

Issue only happens when PiHole is running physically on the RPi, and doesn’t happen when PiHole running on a container on unRAID server

Can’t see anything in logs to point to what the issue is, but I can only think it’s something the RPi hardware has a hand in, rather than PiHole and/RaspOS

I wanted to keep PiHole running directly on the RPi, rather than rely on the unRAID server, to ensure services always available independently of any container issues, but having the FireAngel refuse DHCP renewal puts that idea to rest!

Nothing showing on logs, and even reserving a lease against the FireAngel gateway ends with the same result

Thoughts on a postcard to the usual address etc.
 
Last edited:
What's your network layout? Is everything in a single /24 or do you have VLANs?

You say there's nothing showing in the logs, so you don't see a DHCPREQUEST coming in? Do you see that when on the unRAID server logs?
 
Last edited:
Hmmm… head scratcher.

Yes it pings still, and from the RPi.

Get this though: swapped out a recently added TP-Link 2.5g switch and it works! Makes no sense, the switch should just be effectively passive, but put back the 1g swtitch I had in and the FA gateway behaves.

I’m flummoxed. Even built back RPi on a 3B and restored PiHole config and it behaved as per my original post… no idea why the 2.5g switch would cause this (if it is that), but at least I’m able to work around the issue.
 
Back
Top Bottom