Expected Behaviour:
When I set active DHCP in Docker container, clients not receive IP.
I think I probed everything.
This is compose...
pihole:
restart: unless-stopped
container_name: mipihole
image: pihole/pihole
environment:
- TZ=Europe/Madrid
- WEBPASSWORD=xxxxx
- FTLCONF_LOCAL_IPV4=192.168.5.10
- DNSMASQ_LISTENING=all
- INTERFACE=br0
- PIHOLE_DNS_=127.0.0.1#1531
- DHCP_ACTIVE=true # enable DHCP Server. Static DHCP leases can be configured with a custom /etc/dnsmasq.d/04-pihole-static-dhcp.conf
- DHCP_START=192.168.5.100 # start of the range of IP addresses to hand out by the DHCP Server (mandatory if DHCP Server is enabled)
- DHCP_END=192.168.5.250 # end of the range of IP addresses to hand out by the DHCP Server (mandatory if DHCP Server is enabled)
- DHCP_ROUTER=192.168.5.10 # router (gateway) IP addresses sent by the DHCP server (mandatory if DHCP Server is enabled)
- DHCP_LEASETIME=1 # hours DHCP lease time
- DHCP_IPv6=false # enable DHCP server ipv6 support
- PIHOLE_DOMAIN=mydomain # domain name sent by DHCP Server
- QUERY_LOGGING=true # Enable query logging or not
- PIHOLE_DOCKER_TAG=mipihole
- WEBLOGS_STDOUT=1
volumes:
- /docker/mipihole/etc:/etc/pihole
- /docker/mipihole/dnsmasq:/etc/dnsmasq.d
- /docker/mipihole/milighttpd.conf:/etc/lighttpd/conf-enabled/milighttpd.conf
- /var/log/docker-mipihole:/var/log/pihole
network_mode: "host"
cap_add:
- NET_ADMIN
Actual Behaviour:
This is the list of networks...
~# ip ad | grep "inet "
inet 127.0.0.1/8 scope host lo
inet 192.168.0.10/24 brd 192.168.0.255 scope global eth0
inet 192.168.5.10/24 brd 192.168.5.255 scope global br0
inet 172.20.0.1/24 brd 172.20.0.255 scope global midockerbr
inet 172.20.1.1/24 brd 172.20.1.255 scope global midockerbrpriv
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
Ports are opened and working (in Host, because is in 'network_mode="host"')...
~# ss -putanl | grep pihole
udp UNCONN 0 0 0.0.0.0:53 0.0.0.0:* users:(("pihole-FTL",pid=121401,fd=6))
udp UNCONN 0 0 0.0.0.0:67 0.0.0.0:* users:(("pihole-FTL",pid=121401,fd=4))
udp UNCONN 0 0 [::]:53 [::]:* users:(("pihole-FTL",pid=121401,fd=8))
tcp LISTEN 0 5 127.0.0.1:4711 0.0.0.0:* users:(("pihole-FTL",pid=121401,fd=12))
tcp LISTEN 0 32 0.0.0.0:53 0.0.0.0:* users:(("pihole-FTL",pid=121401,fd=7))
tcp LISTEN 0 5 [::1]:4711 [::]:* users:(("pihole-FTL",pid=121401,fd=17))
tcp LISTEN 0 32 [::]:53 [::]:* users:(("pihole-FTL",pid=121401,fd=9))
~# nc -v -n -q 2 -u 127.0.0.1 67
(UNKNOWN) [127.0.0.1] 67 (bootps) open
^C
~# nc -v -n -u 192.168.5.10 67
(UNKNOWN) [192.168.5.10] 67 (bootps) open
But the log activity of DHCP is only...
~# grep -i dhcp /var/log/docker-mipihole/pihole.log
Jan 29 23:25:43 dnsmasq[298]: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n IDN DHCP DHCPv6 Lua TFTP no-conntrack ipset no-nftset auth cryptohash DNSSEC loop-detect inotify dumpfile
Jan 29 23:25:43 dnsmasq-dhcp[298]: DHCP, IP range 192.168.5.100 -- 192.168.5.250, lease time 1h
Not appears any activity of clients, but I'm probing unsuccessfully.
I think the problem is pihole, because before I had an keadhcp container working without problem, in 'network_mode="host"' too, and all clients received their IPs.
Debug Token:
Not work. It seems to freeze and does not finish.
I've discovered that there are any activity and it's of MAC of my bridge iface (br0), that is not a physical MAC. This physical bridge is formed by some ethernet connectors from my physical hardware:
...
Jan 30 12:29:14 dnsmasq-dhcp[302]: DHCPDISCOVER(br0) 02:46:7d:2f:6f:54
Jan 30 12:29:14 dnsmasq-dhcp[302]: DHCPOFFER(br0) 192.168.5.138 02:46:7d:2f:6f:54
...
I don't know if this item is related.