Please follow the below template, it will help us to help you!
Expected Behaviour:
pi-hole should be able to resolve queries but it doesn't.
Two machines in the local network:
Ubuntu 22 (Server) with pi-hole running in Docker. IP of this machine is 192.168.0.43
Windows 11 laptop manually configured to use DNS of the server. IP of this machine is 192.168.0.64
Docker compose file I am using:
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
- "80:80/tcp"
environment:
TZ: 'Asia/Singapore'
WEBPASSWORD: '****'
DNSMASQ_LISTENING: all
FTLCONF_LOCAL_IPV4: 192.168.0.43
# Volumes store your data between container upgrades
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
- NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
restart: unless-stopped
I followed the quick start and also disabled DNSStubListener as suggested in the README because I am using Ubuntu.
I also added the rule in ufw to allow traffic on port 53.
If I run "nslookup google.com" it should work in both machines
Actual Behaviour:
If I run "nslookup google.com" on the server it works but it doesn't use pi-hole. It uses 192.168.0.1 (the DNS of the router).
If I run "nslookup google.com" on the windows machine it correctly sends the DNS request to the server but it times out. I can confirm that the query reached pi-hole because I can see the request in the pi-hole dashboard.
Why the pi-hole cannot resolve the queries?