I have been trying now for days and cannot seem to get it working
---
version: "3"
networks:
dhcp-relay-net:
ipam:
config:
- subnet: 172.31.0.0/16
front-tier:
external: true
volumes:
pihole:
services:
pihole:
image: pihole/pihole:2022.10
container_name: pihole
hostname: pihole
restart: unless-stopped
cap_add:
- NET_ADMIN
ports:
- "53:53/tcp"
- "53:53/udp"
expose:
- 80
env_file:
- .env
volumes:
- pihole:/etc
- ./dnsmasq.d/99-temp.conf:/etc/dnsmasq.d/99-temp.conf:ro
- ./dnsmasq.d/07-dhcp-options.conf:/etc/dnsmasq.d/07-dhcp-options.conf:ro
- ./pihole/custom.list:/etc/pihole/custom.list:ro
- /etc/resolv.conf:/etc/resolv.conf:ro
dns:
- 127.0.0.1
- 1.1.1.1
depends_on:
- dhcphelper
networks:
dhcp-relay-net:
ipv4_address: '172.31.0.10'
front-tier: {}
dhcphelper:
build: ./dhcp-helper
restart: unless-stopped
network_mode: "host"
userns_mode: "host"
command: -s 172.31.0.10
cap_add:
- NET_ADMIN
My .env file:
TZ=Europe/Berlin
VIRTUAL_HOST=pi.hole
DNSSEC=true
PIHOLE_DNS_=1.1.1.1
DHCP_ACTIVE=false
WEBPASSWORD=000000000
DNSMASQ_USER=root
PIHOLE_UID=0
FTLCONF_LOCAL_IPV4=192.168.1.62
DNSMASQ_LISTENING=all
DHCP_ACTIVE=true
DHCP_START=192.168.1.21
DHCP_END=192.168.1.254
DHCP_ROUTER=192.168.1.1
PIHOLE_DOMAIN=lan
ServerIP:192.168.1.62
Additional information:
my router: 192.168.1.1
Pihole: 192.168.1.62 (docker network 172.23.0.2)
What am i doing wrong
dhcp server is not working not getting any ip's