I would love to setup pihole with my internet, but I have a problem:
According to this post, I should restrain my modem´s pool to just one address, but my modem (Modem Vodafone Station Wi-Fi 6) doesn´t allow me to do so:
Here is my modem´s LAN settings (Static DHCP 192.168.0.2 is my pihole device), and here is my Pihole DHCP setting - those should be according to that post, but for some reason, modem does not allow me to change this (highlighted in red) number to 2.
I tried to delete the static DHCP and do it after, but it did not help. And, obviously, thanks to that it doesn´t work and my modem is circumventing the Pihole to lease addresses, rendering it useless.
Does anybody know how to fix this?
Details about my system:
Ubuntu 24.04.3 LTS
Raspberry Pi 5 Model B Rev 1.0
Core v6.1.4
FTL v6.2.3
Web interface v6.2.1
I am assuming you’re doing this because you want to use Pihole’s DHCP server? If so, why can’t you just toggle the button labelled “Local DHCPv4 Server” in the picture you linked?
I believe the information you’re referencing is for when one cannot disable the DHCP services on their equipment, so that may not apply to your situation. It appears the interface will let you turn off DHCP, but maybe I’m missing something.
So I tried it and it didn´t help. Once the lease for the addresses runs out, you cannot connect to modem itself, to many pages on the internet (for some reason Google works, but any other pages does not).
ipconfig /release and renew did not help, I had to reset the modem to factory settings and set it up again.
Since I couldn´t connect almost anywhere, I suppose the Local DHCPv4 Server setting has to be turned on - it seems I also have to go with the road of limiting IP addresses, which brings me back to my original question.
Yes, to be clear and as @buntspexxt indicated, if you disable your router’s DHCP service, you must either enable DHCP server on your Pihole (or somewhere else) or manually assign each device in your LAN a static/fixed IP address.
When you want the Pi5 to act as a DHCP server, its required to configure static manual IP details on the Pi itself.
A static DHCP reservation for the Pi on the modem/router will stop working once you disabled the DHCP service on the modem.
You didnt mention the distro, but if it's a recent release of Pi-OS/Raspbian:
@nprampage but I have it enabled, as I shown in the main post.
Do I need to do anything else beside this?
@deHakkelaar my distro is Ubuntu 24.04.3 LTS (updated the main post with this info as well)
Do I still need to do the nmtui command when I enabled the DHCP, as shown in the link?
@Gizm0
This might not help, but I recall when I had VF as a ISP. Then when I disabled the DHCP Server on VF Modem, the VF Modem got a different IP address for access to the VF Modem.
I did what wrote gave my Raspberry Pi a static IP using nemli
From memory something like the below:
$ sudo nmcli -p connection show // sudo nmcli -p connection will show the current config.
No!
Though I believe Ubuntu also applies NetworkManager (nmtui & nmcli) just like Pi-OS does, its got an additional abstract layer to configure networking which is called Netplan:
$ apt show netplan.io
[..]
Description: YAML network configuration abstraction for various backends
netplan reads YAML network configuration files which are written
by administrators, installers, cloud image instantiations, or other OS
deployments. During early boot it then generates backend specific
configuration files in /run to hand off control of devices to a particular
networking daemon.
.
Currently supported backends are networkd and NetworkManager.
Ubuntu doesnt come with dhcpcd5.
You can check with below:
apt policy dhcpcd5
Instead it comes with Netplan to configure networking details which can address/orchestrate two types of network managers/manglers: network-manager or systemd-networkd which Netplan calls a "renderer".
I'm not familiar with Netplan but you can try run below to see how its configured currently:
sudo netplan get
According to that Ubuntu doc link I posted previously, above config should be reflected in below config file:
/etc/netplan/99_config.yaml
Follow the instructions in that Ubuntu doc link paragraph "Static IP address assignment" to configure above config file and to apply the changes.
FYI, the netplan.io package includes several manual pages for reference:
That would depend on your Ubuntu flavour.
What flavour are you running, Ubuntu Server or Ubuntu Desktop?
Ubuntu Server and Desktop would both use netplan as primary tool for network configuration (and I believe Ubuntu Core does so as well), but only the Desktop variety would run NetworkManager, which in turn integrates transparently with netplan since Ubuntu 23.10.
But since I'd expect you to run Ubuntu Server, that would mean that you can't use nmtui, but have to adopt your Ubuntu's netplan configuration, just as deHakkelaar has mentioned above.
Finally I had a time to have a look at it.
Before I am gonna disable the DHC on the modem - are these the correct settings?(I could not disable the DNS toggle, even though I was able to write inside that field - not sure if I need it at all, since pihole should be taking care of that)
I just want to be sure, as to avoid the factory resetting the modem, like last time.