Pi-hole running in docker cannot resolve queries

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?

Debug Token:

https://tricorder.pi-hole.net/YpY0gaHK/

Are you running the pihole on a macvlan network? A macvlan will assign the container it's own IP on your LAN. Then you'll use that IP to access the pihole web UI.

Hi Justmorg, I am using standard docker bridge network. Is macvlan a requirement? I didn't see it on the docs

No.

I could be wrong but afaik, macvlan works best when using pihole as your DNS (ie pointing your router to your pihole's IP to resolve DNS requests) but, no not technically necessary for all use cases.

This link has more info on the different network types you can use with pihole.

Please provide a fresh debug token, as your previous has expired.

I decided to install pi-hole natively and it worked just fine. Thank you for the support anyway