Reset Pi-hole host IP when using Pi-hole DHCP

Expected Behaviour:

I'm using the Pi-hole DHCP server as my ISP router does not allow me to set the DNS address. The DHCP server has been disabled on the router. The initial IP assigned by the ISP router to the Raspberry Pi running Pi-hole was 192.168.0.76

After switching from DHCP servers, I've been setting static IPs for devices on my network and I want to set the IP of the Raspberry Pi running Pi-hole to 192.168.0.2

I've tried setting this through the Pi-hole web interface as well as through editing /etc/dhcpd.conf
I've also run pihole -r

I expect the IP of the Raspberry Pi to change to 192.168.0.2

Actual Behaviour:

IP of the host Raspberry Pi does not change and remains set as 192.168.0.76

Debug Token:

Token

That is an OS level issue, not a Pi-hole one.

A DHCP server cannot assign a DHCP lease to itself - it needs a static IP.

It would depend on your chosen OS distribution, release and its respective network management tool how to set a static IP.

For current RPi OS 11/Bullseye, that would be either NetworkManager or dhpcd.

dhpcd is more likely (unless you've explicitly switched to NM via raspi-config).
Its configuration file is /etc/dhcpcd.conf.

A typo, or did you perhaps edit the wrong file?

What is the output of:

grep -vn '^#\|^$' /etc/dhcpcd.conf

Turns out I had been editing the wrong file...oops. Thanks for pointing that out.

After editing the correct file my host IP seems to have changed after a reboot! I've also run pihole -r in the repair mode.

Hopefully this means everything is working as intended. :slight_smile:

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