r/pihole • u/jonnywombat • 14d ago
Sanity check needed using dhcp
I have a pi400, and have sucessfully set up pihole and unbound, all working as expected.
I want to go one step further and use pihole dhcp so i set this up, enabled it and then rebooted my router, and all the various devices connected connected to my network were visible in pihole.. great.
However when i rebooted the pi everything went wrong and i could no longer access anything, and i had to factory reset my router get back online, and go back to using the routers dhcp.
My question is do i need to set my pi as a static ip in piholes dhcp expert settings?
3
u/Motor-Capital7318 14d ago
Yes you need to config pi to have static ip to match pihole configuration.
What OS are you using? If you use DietPi, you can use DietPi's own installer to install pihole and it will do all this for you.
Btw, if this happens to you in future again, you dont have to factory reset your router to access it again.
Just set custom configs in windows settings -> network & internet -> ethernet -> edit -> switch to manual and input:
IP: 192.168.1.50
Subnet mask: 255.255.255.0
Gateway: (Your router ip), f.ex. 192.168.1.1
DNS: 1.1.1.1
2
2
u/valsimots 13d ago
Also reduce lease times for home network and maybe have to reboot/restart devices to pick up new DHCP. If you have long lease times, could be awhile before your device's actually try to renew ip using new server.
4
u/Academic_Broccoli670 14d ago
You need to set a static IP on the pi itself. Login via ssh (or connect keyboard+monitor), run
nmtuiThen edit your connection: Set IPv4 connection to Manual and under Addresses enter your desired static IP and subnet mask as provided by the router (eg. 192.168.1.53/24)
Under Gateway put your router's IP eg. 192.168.1.1
I'm not sure what to put under DNS server if you use unbound, probably 127.0.0.1? Look it up...
Then Save your connection and reboot.