Hi,
I’m experiencing an issue with Pi-hole running in Docker. Before upgrading to Pi-hole version 6, everything worked fine both on the local network and over VPN. However, after the upgrade to V6, Pi-hole only accepts queries over VPN and not from devices on the local network. When I change the setting in Pi-hole’s admin interface to “Respond only on interface,” everything starts working fine, but this issue persists after upgrading to V6.
Here is my docker-compose.yml configuration with Pi-hole and WireGuard (wg-easy):
version: '3'
services:
wg-easy:
environment:
- WG_HOST=example.com
- PASSWORD_HASH=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- WG_DEFAULT_DNS=10.8.1.3
- WG_DEFAULT_ADDRESS=10.8.0.x
image: ghcr.io/wg-easy/wg-easy
container_name: wg-easy
volumes:
- /home/example/Applications/Network/wg-easy:/etc/wireguard
ports:
- "51820:51820/udp"
- "51821:51821/tcp"
restart: unless-stopped
cap_add:
- NET_ADMIN
- SYS_MODULE
sysctls:
- net.ipv4.ip_forward=1
- net.ipv4.conf.all.src_valid_mark=1
networks:
wg-easy:
ipv4_address: 10.8.1.2
pihole:
image: pihole/pihole
container_name: pihole
environment:
- WEBPASSWORD=xxxxxxxxxxxxxxxx
- PIHOLE_INTERFACE=eth0
- DNSMASQ_USER=root
volumes:
- '/home/example/Applications/Network/pihole:/etc/pihole'
- '/home/example/Applications/Network/pihole/dnsmasq.d:/etc/dnsmasq.d'
- './resolv.conf:/etc/resolv.conf'
ports:
- "53:53/tcp"
- "53:53/udp"
- "5353:80/tcp"
restart: unless-stopped
networks:
wg-easy:
ipv4_address: 10.8.1.3
networks:
wg-easy:
ipam:
config:
- subnet: 10.8.1.0/24
The problem:
• Pi-hole worked fine on version V5 on both the local network and over VPN, but after upgrading to V6, it only accepts queries over VPN.
• When I change the setting to “Respond only on interface” in Pi-hole’s admin interface, it starts accepting queries from the local network.
• If I change it to “Allow only local requests,” it works only over VPN and not on the local network.
Questions:
• Could there be an issue with the Docker network configuration? How should I properly configure the network for Pi-hole in Docker to listen on the right interface and accept queries both from VPN and the local network?
• Is there an issue with the PIHOLE_INTERFACE setting, or do I need to adjust Docker’s network configuration?
• What is the best setting in Pi-hole’s admin interface for this kind of configuration?
Thanks for any help!