Determine the IP layout. For example on a typical layout your router might be on .1, you can put Pi-hole on .2, and the DHCP range will be from .10 to .254 (giving you a few extra spaces below .10 for other static IPs later if desired)
Install latest Pi OS
Update it with sudo apt update and sudo apt upgrade
Configure a static IP, eg .2 in the above example. Bookworm uses Network Manager so you can do this easily with sudo nmtui. In nmtui the router's IP will be the gateway, and for the OS DNS servers go with something external such as your ISP's DNS or Cloudflare's 1.1.1.1
Reboot and confirm the static IP is in place and that you have external connectivity
Install Pi-hole and select the correct interface when prompted
Enable Pi-hole as a DHCP server. Use the range determined in step 1
Ensure that the router's DHCP server is turned off
Bounce all clients off and on the network so they pick up their new settings from Pi-hole
You can install Unbound if you wish, that is separate to the DHCP feature.
I've apply those configs, adding the unbound as per de doc, opened ports as per de doc set the configs on the router
but still not getting dhcp working :s
nevermind, now it is working.
for some reason looks like i didnt disable the dhcpv6 on the router, after disabling it, now it is working as expected.
pihole as upstream dns and dhcp server.
Well it was working, now im getting this error
'DHCP packet received on eth0 which has no address'
after some time the ip change and start seeing that error while running
$pihole -t
Let me post the debug token https://tricorder.pi-hole.net/n9j3u9rj/
I think this may be to do with your DHCP range. Your Pi-hole has IP 192.168.0.3 which should be configured as a static IP. But your Pi-hole is also serving that address from its DHCP pool:
In Settings > DHCP change the From address to be 192.168.0.4 and Save the changes with the button at the bottom. That way Pi-hole's own address and the pool addresses won't come into conflict.
That last debug log shows everything working, Pi-hole continues to be at 192.168.0.3. There are some adlists which failed which typically indicates temporary loss of connectivity, for example broadband happens to be down for a few moments right when Pi-hole tries to update. Clear those error messages in Pi-hole and try another Gravity update, see what happens.
How did you give Pi-hole its 192.168.0.3 address? In the earlier post I suggested using nmtui to configure it manually as a static IP, and ensure the DHCP pool range doesn't overlap.
In that screenshot you've posted it looks like it was previously done by having the router's own DHCP allocate a single address, and presumably this would be reserved for Pi-hole, and Pi-hole would be configured to use DHCP. And that's why that screenshot looks like that?
If you've configured Pi-hole to have a static IP this time, the router's DHCP is no longer needed and should remain switched off. Pi-hole will always have the address 192.168.0.3 because it's been manually configured, and all the other clients will get an address from Pi-hole's DHCP pool.
the initial aproach was to get the router with dhcp from .2 to .3, where .2 was my laptop and .3 the pihole, so incase internet connection was lost or dhcp still not working, im still able to access the router settings without hard-reset the router. i was algo setting those ip by static ip using device's mac. now that static setting is no longer present, also router's dhcp is no longer active.
Ace, thanks for confirming. That looks perfect. The Pi-hole will keep using that address for itself. I suspect the adlist issue was a coincidence, as everything in your debug log looks great now.
Are you able to ping one of the failed adlist domains from a terminal on the Pi-hole?
ping zerodot1.gitlab.io
I just noticed the 8th one down has a missing h so will always fail
i've tried to flush the network table and restart the dns, also the pihole itself but seems not helping me with that issue which is pihole lose the ip after sometime
i mean, the pihole boot with ip 192.168.0.3 after 2-3 minutes if i run
$ip add
eth0 has no ip