Ads are not blocked by PiHole and nslookup ads.google.com uses my router as the Server instead of PiHole

Please follow the below template, it will help us to help you!

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

After the installation and configuration my pc should use PiHole as the DNS-Server as using the command "ipconfig /all" shows the local ip of my pihole server.

Actual Behaviour:

When running "nslookup ads.google.com" it is using fritz.box as the server.

I should add my configuration for PiHole:

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
      - "8080:80/tcp"
    environment:
      TZ: Europe/Berlin
      WEBPASSWORD: *somepassword*s
    # Volumes store your data between container upgrades
    volumes:
      - ./etc/pihole:/etc/pihole
      - ./etc/dnsmasq.d:/etc/dnsmasq.d
      - ./etc/resolv.conf:/etc/resolv.conf
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    dns:
      - 127.0.0.1
      - 1.1.1.1
    cap_add:
      - NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
    restart: unless-stopped

I'm really unsure which aspects of my docker-compose.yml are necessary. I just tried a few things I found on the internet.

Debug Token:

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

Apparently, your container has no access to internet. No DNS resolution at all:

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✗] Failed to resolve pekao-bank.io on lo (127.0.0.1)
[✗] Failed to resolve pekao-bank.io on eth0 (192.168.48.2)
[✗] Failed to resolve doubleclick.com via a remote, public DNS server (8.8.8.8)

For testing purposes, remove all volumes and try again.

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