I am unable to block domains on PiHole

I installed Pi-hole on Raspberry Pi. My client is shown as connected but unable to block domains and are also not shown in logs. I have added Pi address as DNS server on my macbook.

I had ngnix setup which I have stopped and did fresh install of Pi-hole.

Expected Behaviour:

When I added google.com to blacklist to check if things are working. It shouldn't have loaded in browser

Actual Behaviour:

But it's loading.

Debug Token:

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

It appears the client is not using Pi-hole for DNS.

From the same client that you believe should be connected to the Pi-Hole for DNS, from the command prompt or terminal on that client (and not via ssh or Putty to the Pi), what is the output of

nslookup pi.hole

nslookup flurry.com

nslookup google.com 172.22.0.2

➜ ~ nslookup pi.hole

Server: 127.0.2.2
Address: 127.0.2.2#53

** server can't find pi.hole: NXDOMAIN

➜ ~ nslookup flurry.com

Server: 127.0.2.2
Address: 127.0.2.2#53

Non-authoritative answer:
Name: flurry.com
Address: 212.82.100.150
Name: flurry.com
Address: 98.136.103.23
Name: flurry.com
Address: 74.6.136.150

➜ ~ nslookup google.com 172.22.0.2
;; connection timed out; no servers could be reached

This client is not using Pi-hole for DNS, it is using a loopback IP.

How is your docker container opening the docker ports to the LAN?

PORT CONFIGURATION	
0.0.0.0:53  53/tcp
:::53  53/tcp
0.0.0.0:53  53/udp
:::53  53/udp
0.0.0.0:67  67/udp
:::67  67/udp
0.0.0.0:80  80/tcp
:::80  80/tcp

using pi-hole_default configuration

How did you started the container?

Can you please port the docker run command or the composer file used to start it?

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/Kolkata'
      WEBPASSWORD: 'example_password'
    # 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

Cloudflare warp was causing the issue. Disabling that fixed the problems

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.