Random IP-Adresse wegen PiHole DHCP Server

Hallo, ich habe heute PiHole neu installiert, da eine neue Version vorhanden ist. Jetzt habe ich das Problem, dass wenn ich den PiHole dhcp-Server verwende, dass alle Geräte in meinem LAN eine 192.168.11.0/24 Adresse bekommen. Mit dieser Adresse kann man allerdings nicht ins Internet, da die Adresse meines Netzwerkes eine 192.168.56.0/24 ist. Ich habe auf der PiHole Seite als DHCP Bereich 192.168.56.100 - 192.168.56.200 eingestellt, trotzdem bekommen meine Geräte die 192.168.11.0/24 Adresse. Wie kann ich dieses Problem beheben?
Es ist sonst kein anderer DHCP Server im Netzwerk.

(Sorry for answering in English)

Probably the devices are still using the previous DHCP lease.

Did you renew the DHCP lease in your devices after changing the DHCP configurations?

No I tried "ipconfig /release" and "ipconfig /renew" multiple times. Additionally I restarted my device and even checkt on other PCs in my Network but every single PC had the same Issue.

Are you sure you don't have a second DHCP server running, e.g., your router?

You can use Wireshark to look at your network to see if there is another server, answering the requests.

If you run ipconfig /all it will show additional information including the DHCP server.

Well, as I said, give Wireshark a try, to see if there really is no other DHCP server. Otherwise, it seems your configuration for dnsmasq may be erroneous. It ain't handing out IPs for the subnet 192.168.11.0/24 for no reason. Especially if all of your clients receive IPs for it.

You may take a look here:

/etc/dnsmasq.d/02-pihole-dhcp.conf
/etc/dnsmasq.d/04-pihole-static-dhcp.conf

There is only the file 02-pihole-dhcp.conf
And this file is correct.

dhcp-authoritative
dhcp-range=192.168.56.100,192.168.56.200,24h
dhcp-option=option:router,192.168.56.254
dhcp-leasefile=/etc/pihole/dhcp.leases
#quiet-dhcp

domain=lan

The dhcp Server is 192.168.11.1 but there is no device in my network with that IP

I tried with Wireshark and there is a device with the IP 192.168.11.1 which gives my PC the IP Adress.
grafik

But I cannot ping this divice from my 192.168.56.0/24 Network. However according to Wireshark the device is piHole.

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

https://tricorder.pi-hole.net/kmAFtt6s/

You debug log shows Pi-hole is installed in a container (you never said that before).

Can you please provide the docker run command or compose file used to start the container?

Also, what is the Operating System of your host, where docker is running?

docker run -d
--name pihole
-e TZ="Europe/Berlin"
-v /etc/pihole:/etc/pihole
-v /etc/dnsmasq.d:/etc/dnsmasq.d
-p 53:53/tcp
-p 53:53/udp
-p 80:80
-p 443:443
--cap-add=NET_ADMIN
--dns=1.1.1.1 --dns=1.0.0.1
--restart=unless-stopped
pihole/pihole:latest

The container is running on a Raspberry PI 4 with Raspian OS

If you want to use Pi-hole container as your DHCP server, you need to add port 67 to your docker run command:

  -p 53:53/tcp
  -p 53:53/udp
  -p 80:80
+ -p 67:67/udp
- -p 443:443

Also, you are using the default bridge network. You probably need to use a different network mode (host or macvlan) or you will need a DHCP relay.

Read this page for details:

Note:
Remove port 443. There is nothing inside Pi-hole v5 container listening on this port.

Thank you!!!

I solved the problem by changing the port "443" to "67/upd" and changing the network typ from "bridged" to "host"

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