Hi,
I have a configuration made following this guide (DHCP with docker-compose and bridge networking), not working (still seeing only one IP for all DHCP devices, probably something wrong)
services:
dhcphelper:
container_name: dhcp-helper
build: ./dhcp-helper
restart: unless-stopped
network_mode: "host"
command: -s 192.168.4.100
cap_add:
- NET_ADMIN
labels:
- "org.label-schema.group=monitoring"
pihole:
container_name: pihole
domainname: docker
hostname: pihole
image: pihole/pihole:latest
pull_policy: always
# security_opt:
# - no-new-privileges:true
restart: unless-stopped
# profiles: ["core", "all"]
# networks:
# - dnet
# - traefik
ports:
- "53:53/tcp"
- "53:53/udp"
# - "67:67/udp"
# - "8081:80"
cap_add:
- NET_ADMIN
dns:
- 127.0.0.1
environment:
# - PUID=${PUID}
# - GUID=${GUID}
- ServerIP=${SERVER_IP}
- PROXY_LOCATION="pihole"
- VIRTUAL_HOST=pihole.${DOMAINNAME_1}
- VIRTUAL_PORT=80
- TZ=${TZ}
- WEBPASSWORD=<password>
- DNS1=192.168.4.101#5054
- IPv6=false
- DNS2=""
- DNSMASQ_LISTENING=all
volumes:
- '$CONFIGDIR/pihole/pihole/:/etc/pihole/'
- '$CONFIGDIR/pihole/dnsmasq.d/:/etc/dnsmasq.d/'
depends_on:
- dhcphelper
networks:
traefik:
ipv4_address: '192.168.3.100'
pihole:
ipv4_address: '192.168.4.100'
labels:
- "org.label-schema.group=monitoring"
- "traefik.enable=true"
# HTTP Routers
- "traefik.http.routers.pihole-rtr.entrypoints=websecure"
- "traefik.http.routers.pihole-rtr.rule=Host(`pihole.$DOMAINNAME_1`)" # HostRegexp:pihole.${DOMAINNAME_1},{catchall:.*}" # Host(`pihole.$DOMAINNAME_1`)"
# Middlewares
- "traefik.http.routers.pihole-rtr.middlewares=middlewares-chain-no-auth@file"
# HTTP Services
- "traefik.http.routers.pihole-rtr.service=pihole-svc"
- "traefik.http.services.pihole-svc.loadbalancer.server.port=80"
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
138e2a9acedb pihole/pihole:latest "/s6-init" 28 minutes ago Up 28 minutes (healthy) 0.0.0.0:53->53/tcp, 0.0.0.0:53->53/udp, 67/udp, 80/tcp pihole
[...]
a45e00f0907f docker-compose-dhcphelper "dhcp-helper -n -s 1…" 2 weeks ago Up 2 weeks dhcp-helper
[...]
sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 19119/docker-proxy
[...]
udp 0 0 0.0.0.0:53 0.0.0.0:* 19134/docker-proxy
udp 0 0 0.0.0.0:67 0.0.0.0:* 3306/dhcp-helper
[...]