Pi Hole cant get its own IP

I've set up a pihole as the LAN dhcp server + upstream dns, it has the static ip .3 and the S.O. boot is ok, but after some minutes the pihole lose its own IP address (.3)

Expected Behaviour:

to keep the .3 ip and keep serving ip allocations for other devices

O.S. details:
$uname -r
´´´
6.1.0-rpi8-rpi-v8
´´´

$uname -a
´´´
Linux rpi-srv 6.1.0-rpi8-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 GNU/Linux
´´´

$lsb_release -a
´´´
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
´´´

Actual Behaviour:

pihole boot with IP .3, then after 2-3 minutes lose that IP
$ip add
eth0 no ip address details

so internet connection lost, dns not working

Debug Token:

debug log

[ Followon new topic from Pihole as DHCP on bookworm ]

This might benefit from a fresh set of eyes. I can't work out what's going on. A moment ago (in the previous thread) your debug log looked good. In this one, the Pi-hole DHCP server is not reponding to itself and Pi-hole is flagging such packets, external adlists are indeed unreachable. Yet it does have the static IP assigned as expected.

Is this a fresh install or was it modified from the setup in the opening post on the other thread where you had this same problem? It looks like it was modified, since the log references earlier nameserver options?

Is there anything else running on the OS worth noting? Any kind of firewall? It looks like the OS retains its IP addressing but network traffic gets blocked, causing external lists to fail and DHCP to go nowhere.

I just installed the Pihole on my rpi 3b+, I've been using it before and love it, so just made a fresh install on the Pihole, trying to get it up an running as it used to be.

I've ufw active and enabled ports as per doc

$sudo ufw status

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere
80                         ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
53/tcp                     ALLOW       Anywhere
53/udp                     ALLOW       Anywhere
67/udp                     ALLOW       Anywhere
67/tcp                     ALLOW       Anywhere
4711/tcp                   ALLOW       Anywhere
5335/tcp                   ALLOW       Anywhere
22/tcp (v6)                ALLOW       Anywhere (v6)
80 (v6)                    ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
53/tcp (v6)                ALLOW       Anywhere (v6)
53/udp (v6)                ALLOW       Anywhere (v6)
67/udp (v6)                ALLOW       Anywhere (v6)
67/tcp (v6)                ALLOW       Anywhere (v6)
4711/tcp (v6)              ALLOW       Anywhere (v6)
5335/tcp (v6)              ALLOW       Anywhere (v6)

A DHCP server can't give an IP to itself.

You need a static IP.

related to the addlists, I've fixed the typo (change tap://... for http://..) and now it works without any issue I can see the domain list being updated

See previous topic – IP is .3 static assigned in NM, DHCP range is .4 upwards

1 Like

Pihole has the static ip config (trying to use .3) and DHCP range from .4 to .250 and .1 as gateway (same as router)

This seems like a networking or perhaps hardware issue.
Even if there is no IP address, the output should at least consist of two lines

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether <redacted> brd ff:ff:ff:ff:ff:ff

How did you go about assigning a static IP address to the machine hosting your Pi-hole?

What's the result of

sudo awk '/\[ipv4\]/,/method/' /etc/NetworkManager/system-connections/*.nmconnection

not sure why and/or what was the fix, but after some reboots of router and rpi, now it is working without any issue

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