DHCP will not enable

When I click on the DHCP server enabled checkbox and then Save, a message appears "The DHCP server has been activated" but the checkbox is unticked. Clicking on another page and returning to the DHCP page the checkbox is still unticked. My phone identifies the wifi but sits there "Getting IP address" so clearly the DHCP server is not enabeld. If I connect a different machine acting as a DHCP server the phone connects instantly

Raspberry Pi 1. Bullseye OS. Nothing else installed.

Defined a couple of local DNS records.
Configured the list of clients

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:

pihole -d

or do it through the Web interface:

Tools > Generate Debug Log

Make sure to also enter the details, such as Range, Gateway and possibly the settings on the right hand side too, before clicking Save.

Here's log token: https://tricorder.pi-hole.net/YWpOD1qX/
It does look like it thinks DHCP is enabled so curious that it is not working. I trust that I don't need to reboot for it to take effect?

Yes I have set the range and gateway. Not touched the other options.

It looks like PiHole has saved my entries into setupVars.conf:

DHCP_ACTIVE=true
DHCP_START=172.21.10.50
DHCP_END=172.21.10.74
DHCP_ROUTER=172.21.10.100
DHCP_LEASETIME=24

But it is not using them to run a DHCP server.

Could it be that the DHCP port has not been opened? I check the open ports and 68 is not in the list:

sudo ss -ltn
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 32 0.0.0.0:53 0.0.0.0:*
LISTEN 0 1024 0.0.0.0:80 0.0.0.0:*
LISTEN 0 5 0.0.0.0:5900 0.0.0.0:*
LISTEN 0 5 127.0.0.1:4711 0.0.0.0:*
LISTEN 0 128 127.0.0.1:631 0.0.0.0:*
LISTEN 0 32 [::]:53 [::]:*
LISTEN 0 1024 [::]:80 [::]:*
LISTEN 0 5 [::1]:4711 [::]:*
LISTEN 0 128 [::1]:631 [::]:*
LISTEN 0 5 [::]:5900 [::]:*

Your Pi-hole IP is 172.21.10.6, but another IP (172.21.10.5) is showing as DHCP server.

Also, when I change the DHCP settings, the tail of pihole.log has lots of messages about exiting on receipt of SIGTERM followed by multiple starts - is that normal?

Dec 5 19:34:23: exiting on receipt of SIGTERM
Dec 5 19:34:23: exiting on receipt of SIGTERM
Dec 5 19:34:23: exiting on receipt of SIGTERM
Dec 5 19:34:23: exiting on receipt of SIGTERM
Dec 5 19:34:23: exiting on receipt of SIGTERM
Dec 5 19:34:23: exiting on receipt of SIGTERM
Dec 5 19:34:23: exiting on receipt of SIGTERM
Dec 5 19:34:23: exiting on receipt of SIGTERM
Dec 5 19:34:23: exiting on receipt of SIGTERM
Dec 5 19:34:23: exiting on receipt of SIGTERM
Dec 5 19:34:23: exiting on receipt of SIGTERM
Dec 5 19:34:29: started, version pi-hole-v2.89-9461807 cachesize 10000
Dec 5 19:34:29: DNS service limited to local subnets
Dec 5 19:34:29: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n IDN DHCP DHCPv6 Lua TFTP no-conntrack ipset no-nftset auth cryptohash DNSSEC loop-detect inotify dumpfile
Dec 5 19:34:29: using nameserver 9.9.9.9#53
Dec 5 19:34:29: using nameserver 149.112.112.112#53
Dec 5 19:34:29: using only locally-known addresses for onion
Dec 5 19:34:29: using only locally-known addresses for bind
Dec 5 19:34:29: using only locally-known addresses for invalid
Dec 5 19:34:29: using only locally-known addresses for localhost
Dec 5 19:34:29: using only locally-known addresses for test
Dec 5 19:34:29: read /etc/hosts - 7 names
Dec 5 19:34:29: read /etc/pihole/custom.list - 3 names
Dec 5 19:34:29: read /etc/pihole/local.list - 0 names
Dec 5 19:34:29: query[A] amdcopen.m.taobao.com from 172.21.10.87
Dec 5 19:34:29: forwarded amdcopen.m.taobao.com to 9.9.9.9
Dec 5 19:34:29: forwarded amdcopen.m.taobao.com to 149.112.112.112
Dec 5 19:34:29: reply amdcopen.m.taobao.com is
Dec 5 19:34:29: reply amdcopen.m.taobao.com.gds.alibabadns.com is 203.119.217.116
Dec 5 19:34:29: started, version pi-hole-v2.89-9461807 cachesize 10000
Dec 5 19:34:29: DNS service limited to local subnets
Dec 5 19:34:29: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n IDN DHCP DHCPv6 Lua TFTP no-conntrack ipset no-nftset auth cryptohash DNSSEC loop-detect inotify dumpfile
Dec 5 19:34:29: using nameserver 9.9.9.9#53
Dec 5 19:34:29: using nameserver 149.112.112.112#53
Dec 5 19:34:29: using only locally-known addresses for onion
Dec 5 19:34:29: using only locally-known addresses for bind
Dec 5 19:34:29: using only locally-known addresses for invalid
Dec 5 19:34:29: using only locally-known addresses for localhost
Dec 5 19:34:29: using only locally-known addresses for test
Dec 5 19:34:29: read /etc/hosts - 7 names
Dec 5 19:34:29: read /etc/pihole/custom.list - 3 names
Dec 5 19:34:29: read /etc/pihole/local.list - 0 names

Yes there is another DHCP server on 172.21.10.5, using a different set of IP addresses (if I disconnect that one then devices do not get IP addresses from the pihole Raspberry Pi). I have already reconfigured that server to use the PiHole for DNS.

If it wasn't for the other DHCP server, no devices would have been able to get IP addresses when I disabled them on the router.

As a workaround (until someone comes up with an idea that fixes this issue), I have installed isc-dhcp-server following the instructions here: rpi-networklab/dhcp-server.md at d666ab4967a23fbfdffdec4ef41b8e3e515b9172 · hpreston/rpi-networklab · GitHub. That works perfectly to add DHCP to the Raspberry Pi running Pi-Hole.

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