No address range available for DHCP request via eth0

I'm running Pi-hole on a Mac with docker. Using the router dhcp server works fine, but if I tried to use pi-hole dhcp my devices do not receive an ip.

Expected Behaviour:

Pi-Hole should be able to give ip addresses to devices connected to the network.

$ cat /var/log/pihole.log
dnsmasq-dhcp[484]: no address range available for DHCP request via eth0

Actual Behaviour:

Devices should be receiving ips from pi-hole dhcp server.

Debug Token:

wiko1kbp51

@diginc is our resident docker expert and may have insight

Hello, what does your docker run command / argument list look like? Specifically networking, are you running docker port forwards (-p 67:67) or (--net=host) networking?

Port forwarding networking requires you use a DHCP-Relay of some sort to bridge the two different IP ranges of your network and docker's network. Newer / advanced routers often support a dhcp-relay, otherwise you could install one on your mac.

If you're running --net=host it should probalby work without problem unless you have a firewall blocking the container from being fully on your network.

There is also a very nice thread discussing how to debug DHCP within a container here : DHCP is not working · Issue #355 · pi-hole/docker-pi-hole · GitHub

1 Like

Docker run command:

ocker run -d \
    --name pihole \
    -p 53:53/tcp -p 53:53/udp \
    -p 67:67/udp \
    -p 80:80 \
    -p 443:443 \
    -v "/Users/plorenzo/pihole/:/etc/pihole/" \
    -v "/Users/plorenzo/dnsmasq.d/:/etc/dnsmasq.d/" \
    -e ServerIP="192.168.1.82" \
    --restart=unless-stopped \
    --cap-add=NET_ADMIN \
    --dns=127.0.0.1 --dns=1.1.1.1 \
    pihole/pihole:latest

I found this on my router, but it doesn't let me turn it on.
50

I'll try to run it with --net=host, thank you for your answers, I've been quite stuck for a few days with this :slight_smile:

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