Hi guys, I would like to see the client stats on the pihole dashboard and thus tried to use the pihole-unbound-container with the host network. However, after adding network_mode: host
to the stack, it keeps repeating the following error:
lighttpd: no process found
2022-10-22 15:52:07: network.c.369) can't bind to socket: 192.168.178.10:80: Cannot assign requested address
Stopping lighttpd
EDIT: This error does not seem to be related to the issue. It disappears if I set FTLCONF_LOCAL_IPV4
to 127.0.0.1
instead of 192.168.178.10
, although it is supposed to be Set to your server's LAN IP, used by web block modes and lighttpd bind address.
After setting it to 127.0.0.1
the pihole still works with the default network and the container logs no longer show an error with the host network. However, the pihole still won't actually work with the host network and sudo ss -ltmp
shows that pihole doesn't even bind port 53 or 80.
How do I use pihole-unbound with the host network?
_
This is the stack I am trying to use (and which works with the default network and open ports):
version: '3.0'
volumes:
etc_pihole-unbound:
etc_pihole_dnsmasq-unbound:
services:
pihole:
container_name: pihole
image: cbcrowe/pihole-unbound:latest
hostname: ${HOSTNAME}
domainname: ${DOMAIN_NAME}
environment:
- FTLCONF_LOCAL_IPV4=${FTLCONF_LOCAL_IPV4}
- TZ=${TZ:-UTC}
- WEBPASSWORD=${WEBPASSWORD}
- WEBTHEME=${WEBTHEME:-default-light}
- REV_SERVER=${REV_SERVER:-false}
- REV_SERVER_TARGET=${REV_SERVER_TARGET}
- REV_SERVER_DOMAIN=${REV_SERVER_DOMAIN}
- REV_SERVER_CIDR=${REV_SERVER_CIDR}
- PIHOLE_DNS_=127.0.0.1#5335
- DNSSEC="true"
- DNSMASQ_LISTENING=single
volumes:
- etc_pihole-unbound:/etc/pihole:rw
- etc_pihole_dnsmasq-unbound:/etc/dnsmasq.d:rw
restart: unless-stopped
network_mode: host