DHCP Server Problems Docker

Expected Behaviour:

IP addresses allocated on network.

Actual Behaviour:

DNS works fine but no DHCP server.

Debug Token:

https://tricorder.pi-hole.net/99czcsnlh6

I'm running PiHole in docker, previously ran DHCP server fine with

--NET=host

due to a port conflict with Nginx I'm trying to allocate only the ports I need so I can free up 80. My docker run script is now:

docker run -d \
    --name pihole \
    -p "53:53/tcp" \
    -p "53:53/udp" \
    -p "67:67" \
    -p "68:68" \
    -p "80:80/tcp" \
    -p "443:443/tcp" \
    -v "/home/meatalhead/pihole/:/etc/pihole/" \
    -v "/etc/dnsmasq.d/:/etc/dnsmasq.d/" \
    -e ServerIP="192.168.1.68/24" \
    -e VIRTUAL_HOST="pi.hole" \
    -e PROXY_LOCATION="pi.hole" \
    -e TZ="Europe/London" \
    --restart=unless-stopped \
    --dns 127.0.0.1 \
    --cap-add NET_ADMIN \
    pihole/pihole:latest

My debug log is saying: Error: Neither IPv4 or IPv6 selected and

*** [ DIAGNOSING ]: Networking
[✓] IPv4 address(es) bound to the eth0 interface:
   192.168.1.68/24 does not match the IP found in /etc/pihole/setupVars.conf

The contents of /etc/pihole/setupVars.conf:

DNS_BOGUS_PRIV=
DNS_FQDN_REQUIRED=
DNSSEC=
CONDITIONAL_FORWARDING=
CONDITIONAL_FORWARDING_IP=
CONDITIONAL_FORWARDING_DOMAIN=
CONDITIONAL_FORWARDING_REVERSE=
PIHOLE_DNS_1=8.8.8.8
PIHOLE_DNS_2=8.8.4.4
PIHOLE_INTERFACE=eth0

Has anyone else got PiHole in docker with DHCP running and not using --NET=Host ?

I've got round this by creating a pub_net with macvlan, then allocating separat IPv4s for each container.

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