Pi Hole running in a docker contaier in a raspbianOS, RPi4 machine. My compose file:
version: "3" services: pihole: container_name: pihole image: pihole/pihole:latest network_mode: "host" environment: TZ: 'Europe/Budapest' WEBPASSWORD: 'pwd' FTLCONF_LOCAL_IPV4: '192.168.1.164' VIRTUAL_HOST: 'pi.hole' PROXY_LOCATION: 'pi.hole' DNSSEC: 'true' DHCP_ROUTER: '192.168.1.1' DHCP_START: '192.168.1.1' DHCP_END: '192.168.1.249' # INTERFACE: The default works fine with our basic example docker run commands. If you're trying to use DHCP with --net host mode then you may have to customize this or DNSMASQ_LISTENING. DNSMASQ_LISTENING: 'all' WEB_PORT: 81 volumes: - './etc-pihole:/etc/pihole' - './etc-dnsmasq.d:/etc/dnsmasq.d' - '/etc/hosts:/etc/hosts' cap_add: - NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed restart: unless-stopped
- On my router (192.168.1.1), is an DHCP server, this is working fine. Still the RPi has a fix IP address, but this is synced, so this is fine.
- I would like host name resolution with the Pi Hole DNS server, as I set up in the
DNS name resolution not working on my home network. But on the pi, outside the docker container is fine. Somtime I can access the
http://pi.hole address, and send me the standard 80 port Apache. But that's all. Error messages:
DNSMASQ_WARN Warning in dnsmasq core: ignoring nameserver 192.168.1.164 - local interface
nslookup for the pi ip address:
nslookup 192.168.1.164 ** server can't find 220.127.116.11.in-addr.arpa: NXDOMAIN
or the name:
nslookup pi464 Server: 127.0.0.53 Address: 127.0.0.53#53 ** server can't find pi464: SERVFAIL
pihole log file details, here looks everything working.
Mar 19 17:43:47 dnsmasq: query[A] pi464 from 192.168.1.164 Mar 19 17:43:47 dnsmasq: Pi-hole hostname pi464 is 192.168.1.164 Mar 19 17:43:47 dnsmasq: query[AAAA] pi464 from 192.168.1.164 Mar 19 17:43:47 dnsmasq: Pi-hole hostname pi464 is fe80::9ab0:fbe8:fd82:6ab4 Mar 19 17:43:54 dnsmasq: query[A] pi.hole from 127.0.0.1 Mar 19 17:43:54 dnsmasq: Pi-hole hostname pi.hole is 192.168.1.164 Mar 19 17:44:24 dnsmasq: query[A] pi.hole from 127.0.0.1 Mar 19 17:44:24 dnsmasq: Pi-hole hostname pi.hole is 192.168.1.164
My router DNS server is these machine of course.
Any idea, how can I solve these problem?