# DNS blocking doesn't work properly

**URL:** <https://discourse.pi-hole.net/t/dns-blocking-doesnt-work-properly/67927>\
**Category:** docker\
**Created:** [January 27, 2024, 5:50pm UTC](https://discourse.pi-hole.net/t/dns-blocking-doesnt-work-properly/67927 "2024-01-27T17:50:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![F-4Dev](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/f-4dev/32/40147_2.png) [@F-4Dev](https://discourse.pi-hole.net/u/F-4Dev)\
**Post date:** [January 27, 2024, 5:50pm UTC](https://discourse.pi-hole.net/t/dns-blocking-doesnt-work-properly/67927/1 "2024-01-27T17:50:13Z")

</div>

# DNS blocking doesn't work properly

## Expected Behaviour:

Pihole should block dns queries but it doesn't even though I configured the IP of my server as dns resolver and it works when I set on my fritz box.

## Actual Behaviour:

Dns blocking is functional on the whole network using the dns settings on my fritz box router but not on my windows 11 machine or phone (android 14 running GrapheneOS) if I configure the local IP of my server as the dns resolver.

## Debug Token:

[https://tricorder.pi-hole.net/LGb91XVc/](https://tricorder.pi-hole.net/LGb91XVc/)

## Server Configuration:

- OS: Debian GNU/Linux 12 (bookworm)
- using Docker version 20.10.24+dfsg1
  - Container is newly created using the folowing docker compose  
(old pihole image was deleted)

- reverse proxy: nginx version 1.22.1

### docker-compose.yml

```yml
version: "3"
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
      - "53:53/tcp"
      - "192.168.178.48:53:53/udp" # local server IP
      - "5004:80/tcp"
    environment:
      TZ: 'Europe/Berlin'
      WEBPASSWORD: 'securepwd'
    volumes:
      - './etc-pihole:/etc/pihole'
      - './etc-dnsmasq.d:/etc/dnsmasq.d'
    restart: unless-stopped

```

### nginx config

```conf
server {
   server_name pihole.f4-dev.me;
   location / {
       proxy_pass http://127.0.0.1:5004;
       proxy_set_header Host $host;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
   }
}

```

### My dns config on windows

 ![image](https://discourse.pi-hole.net/uploads/default/original/3X/4/9/4935f8493a3250c089b50dcec0f75690e4ead902.png)

### Command output (found in [this discussion](https://discourse.pi-hole.net/t/pihole-not-working-even-after-dns-configuration/38187))

 ![image](https://discourse.pi-hole.net/uploads/default/original/3X/9/f/9fbe030c5b75bbbdfb18de951543bbf21e4bd06c.png)

### Fritzbox dns configuration

 ![image](https://discourse.pi-hole.net/uploads/default/original/3X/6/2/629d96bae12d7b46e0effcdb33f9557c98d96fdf.png)

Thanks for your help :\>
