DNS Request Timeout using 1 client

My upstream DNS server are Cloudflare's 1.1.1.1 and 1.0.0.1
I see no queries on the Pi-hole Query Log, just the default pi.hole's loopback request

Mar  3 20:03:45 dnsmasq[3447]: query[A] pi.hole from 127.0.0.1
Mar  3 20:03:45 dnsmasq[3447]: /etc/pihole/local.list pi.hole is 0.0.0.0

This indicates that DNS queries from network clients are not making it to Pi-hole. The problem appears to lie outside of Pi-hole, either in your network or in your Docker container configuration.

What should I do then?
My docker-compose.yml file:

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
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp"
      - "80:80/tcp"
      - "443:443/tcp"
    dns:
      - 127.0.0.1
      - 1.1.1.1
    environment:
      TZ: 'Europe/Madrid'
      DNS1: 1.1.1.1
      DNS2: 1.0.0.1
      # WEBPASSWORD: 'set a secure password here or it will be random'
    # Volumes store your data between container upgrades
    volumes:
      - './etc-pihole/:/etc/pihole/'
      - './etc-dnsmasq.d/:/etc/dnsmasq.d/'
    # Recommended but not required (DHCP needs NET_ADMIN)
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    cap_add:
      - NET_ADMIN
    restart: unless-stopped

So we've confirmed your client's DNS request made it to your Pi-hole host, and as far as we can tell, Pi-hole is operational inside its Docker container, but the requests do not make it into Pi-hole's container.

Maybe your Docker allows only localhost connections?

Did you check the ports for your container when its up and running?

I've checked the ports for my container when it's up and running

> sudo docker ps
42ee74fe7f2e   pihole/pihole:latest                     "/s6-init"   33 hours ago   Up 33 hours (healthy)   0.0.0.0:53->53/udp, 0.0.0.0:53->53/tcp, 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:67->67/udp   pihole
> sudo docker port 42ee74fe7f2e
443/tcp -> 0.0.0.0:443
53/tcp -> 0.0.0.0:53
53/udp -> 0.0.0.0:53
67/udp -> 0.0.0.0:67
80/tcp -> 0.0.0.0:80

It works if I make a DNS request from pi-hole's container cli, it must be a docker problem

sudo docker exec -it 42ee74fe7f2e /bin/bash
root@42ee74fe7f2e:/# nslookup google.com
Server:         127.0.0.11
Address:        127.0.0.11#53

Non-authoritative answer:
Name:   google.com
Address: 216.58.209.78
Name:   google.com
Address: 2a00:1450:4003:801::200e

What is the output from:

sudo iptables -L -n

This is the whole output, all pi-hole's ports are in ACCEPT mode:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy DROP)
target     prot opt source               destination
DOCKER-USER  all  --  0.0.0.0/0            0.0.0.0/0
DOCKER-ISOLATION-STAGE-1  all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
DOCKER     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
DOCKER     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED
DOCKER     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain DOCKER (3 references)
target     prot opt source               destination
ACCEPT     tcp  --  0.0.0.0/0            172.18.0.2           tcp dpt:443
ACCEPT     tcp  --  0.0.0.0/0            172.18.0.2           tcp dpt:80
ACCEPT     udp  --  0.0.0.0/0            172.18.0.2           udp dpt:67
ACCEPT     tcp  --  0.0.0.0/0            172.18.0.2           tcp dpt:53
ACCEPT     udp  --  0.0.0.0/0            172.18.0.2           udp dpt:53

Chain DOCKER-ISOLATION-STAGE-1 (1 references)
target     prot opt source               destination
DOCKER-ISOLATION-STAGE-2  all  --  0.0.0.0/0            0.0.0.0/0
DOCKER-ISOLATION-STAGE-2  all  --  0.0.0.0/0            0.0.0.0/0
DOCKER-ISOLATION-STAGE-2  all  --  0.0.0.0/0            0.0.0.0/0
RETURN     all  --  0.0.0.0/0            0.0.0.0/0

Chain DOCKER-ISOLATION-STAGE-2 (3 references)
target     prot opt source               destination
DROP       all  --  0.0.0.0/0            0.0.0.0/0
DROP       all  --  0.0.0.0/0            0.0.0.0/0
DROP       all  --  0.0.0.0/0            0.0.0.0/0
RETURN     all  --  0.0.0.0/0            0.0.0.0/0

Chain DOCKER-USER (1 references)
target     prot opt source               destination
RETURN     all  --  0.0.0.0/0            0.0.0.0/0

And what is the IP address of the Pi-hole container?

Are you still making changes with ufw?

Edit: Post the output from docker container inspect pihole

My ufw rules are still up.
The IP of Pi-Hole's docker container is the following 172.18.0.2, ran:

sudo docker exec pihole cat /etc/hosts
127.0.0.1       localhost
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.18.0.2      42ee74fe7f2e

And this is the entire json from docker container inspect pihole command:

[
    {
        "Id": "42ee74fe7f2e0dda521908f06367f81308097a0fee33b155de41c37bf5875f0a",
        "Created": "2021-03-02T14:42:00.554466225Z",
        "Path": "/s6-init",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 93377,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2021-03-02T14:42:02.272884366Z",
            "FinishedAt": "0001-01-01T00:00:00Z",
            "Health": {
                "Status": "healthy",
                "FailingStreak": 0,
                "Log": [
                    {
                        "Start": "2021-03-06T10:06:35.542365978Z",
                        "End": "2021-03-06T10:06:35.731958387Z",
                        "ExitCode": 0,
                        "Output": "\n; <<>> DiG 9.11.5-P4-5.1+deb10u2-Debian <<>> +norecurse +retry=0 @127.0.0.1 pi.hole\n; (1 server found)\n;; global options: +cmd\n;; Got answer:\n;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61775\n;; flags: qr aa ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 4096\n;; QUESTION SECTION:\n;pi.hole.\t\t\tIN\tA\n\n;; ANSWER SECTION:\npi.hole.\t\t2\tIN\tA\t0.0.0.0\n\n;; Query time: 0 msec\n;; SERVER: 127.0.0.1#53(127.0.0.1)\n;; WHEN: Sat Mar 06 11:06:35 CET 2021\n;; MSG SIZE  rcvd: 52\n\n"
                    },
                    {
                        "Start": "2021-03-06T10:07:05.743832532Z",
                        "End": "2021-03-06T10:07:05.9218578Z",
                        "ExitCode": 0,
                        "Output": "\n; <<>> DiG 9.11.5-P4-5.1+deb10u2-Debian <<>> +norecurse +retry=0 @127.0.0.1 pi.hole\n; (1 server found)\n;; global options: +cmd\n;; Got answer:\n;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57291\n;; flags: qr aa ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 4096\n;; QUESTION SECTION:\n;pi.hole.\t\t\tIN\tA\n\n;; ANSWER SECTION:\npi.hole.\t\t2\tIN\tA\t0.0.0.0\n\n;; Query time: 0 msec\n;; SERVER: 127.0.0.1#53(127.0.0.1)\n;; WHEN: Sat Mar 06 11:07:05 CET 2021\n;; MSG SIZE  rcvd: 52\n\n"
                    },
                    {
                        "Start": "2021-03-06T10:07:35.932180569Z",
                        "End": "2021-03-06T10:07:36.114859719Z",
                        "ExitCode": 0,
                        "Output": "\n; <<>> DiG 9.11.5-P4-5.1+deb10u2-Debian <<>> +norecurse +retry=0 @127.0.0.1 pi.hole\n; (1 server found)\n;; global options: +cmd\n;; Got answer:\n;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60052\n;; flags: qr aa ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 4096\n;; QUESTION SECTION:\n;pi.hole.\t\t\tIN\tA\n\n;; ANSWER SECTION:\npi.hole.\t\t2\tIN\tA\t0.0.0.0\n\n;; Query time: 0 msec\n;; SERVER: 127.0.0.1#53(127.0.0.1)\n;; WHEN: Sat Mar 06 11:07:36 CET 2021\n;; MSG SIZE  rcvd: 52\n\n"
                    },
                    {
                        "Start": "2021-03-06T10:08:06.124819805Z",
                        "End": "2021-03-06T10:08:06.312969304Z",
                        "ExitCode": 0,
                        "Output": "\n; <<>> DiG 9.11.5-P4-5.1+deb10u2-Debian <<>> +norecurse +retry=0 @127.0.0.1 pi.hole\n; (1 server found)\n;; global options: +cmd\n;; Got answer:\n;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48348\n;; flags: qr aa ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 4096\n;; QUESTION SECTION:\n;pi.hole.\t\t\tIN\tA\n\n;; ANSWER SECTION:\npi.hole.\t\t2\tIN\tA\t0.0.0.0\n\n;; Query time: 0 msec\n;; SERVER: 127.0.0.1#53(127.0.0.1)\n;; WHEN: Sat Mar 06 11:08:06 CET 2021\n;; MSG SIZE  rcvd: 52\n\n"
                    },
                    {
                        "Start": "2021-03-06T10:08:36.323462202Z",
                        "End": "2021-03-06T10:08:36.507519406Z",
                        "ExitCode": 0,
                        "Output": "\n; <<>> DiG 9.11.5-P4-5.1+deb10u2-Debian <<>> +norecurse +retry=0 @127.0.0.1 pi.hole\n; (1 server found)\n;; global options: +cmd\n;; Got answer:\n;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35610\n;; flags: qr aa ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1\n\n;; OPT PSEUDOSECTION:\n; EDNS: version: 0, flags:; udp: 4096\n;; QUESTION SECTION:\n;pi.hole.\t\t\tIN\tA\n\n;; ANSWER SECTION:\npi.hole.\t\t2\tIN\tA\t0.0.0.0\n\n;; Query time: 0 msec\n;; SERVER: 127.0.0.1#53(127.0.0.1)\n;; WHEN: Sat Mar 06 11:08:36 CET 2021\n;; MSG SIZE  rcvd: 52\n\n"
                    }
                ]
            }
        },
        "Image": "sha256:30ed4cf3e0dd2c5065d94c841212b478162e02757aba34afa36369ea8861bb55",
        "ResolvConfPath": "/var/lib/docker/containers/42ee74fe7f2e0dda521908f06367f81308097a0fee33b155de41c37bf5875f0a/resolv.conf",
        "HostnamePath": "/var/lib/docker/containers/42ee74fe7f2e0dda521908f06367f81308097a0fee33b155de41c37bf5875f0a/hostname",
        "HostsPath": "/var/lib/docker/containers/42ee74fe7f2e0dda521908f06367f81308097a0fee33b155de41c37bf5875f0a/hosts",
        "LogPath": "/var/lib/docker/containers/42ee74fe7f2e0dda521908f06367f81308097a0fee33b155de41c37bf5875f0a/42ee74fe7f2e0dda521908f06367f81308097a0fee33b155de41c37bf5875f0a-json.log",
        "Name": "/pihole",
        "RestartCount": 0,
        "Driver": "overlay2",
        "Platform": "linux",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "docker-default",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "/home/nako/pi-hole/etc-dnsmasq.d:/etc/dnsmasq.d:rw",
                "/home/nako/pi-hole/etc-pihole:/etc/pihole:rw"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "pi-hole_default",
            "PortBindings": {
                "443/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "443"
                    }
                ],
                "53/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "53"
                    }
                ],
                "53/udp": [
                    {
                        "HostIp": "",
                        "HostPort": "53"
                    }
                ],
                "67/udp": [
                    {
                        "HostIp": "",
                        "HostPort": "67"
                    }
                ],
                "80/tcp": [
                    {
                        "HostIp": "",
                        "HostPort": "80"
                    }
                ]
            },
            "RestartPolicy": {
                "Name": "unless-stopped",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": [],
            "CapAdd": [
                "NET_ADMIN"
            ],
            "CapDrop": null,
            "CgroupnsMode": "host",
            "Dns": [
                "127.0.0.1",
                "1.1.1.1"
            ],
            "DnsOptions": null,
            "DnsSearch": null,
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "shareable",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 67108864,
            "Runtime": "runc",
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "",
            "CpuShares": 0,
            "Memory": 0,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": null,
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": null,
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "KernelMemory": 0,
            "KernelMemoryTCP": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": null,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": [
                "/proc/asound",
                "/proc/acpi",
                "/proc/kcore",
                "/proc/keys",
                "/proc/latency_stats",
                "/proc/timer_list",
                "/proc/timer_stats",
                "/proc/sched_debug",
                "/proc/scsi",
                "/sys/firmware"
            ],
            "ReadonlyPaths": [
                "/proc/bus",
                "/proc/fs",
                "/proc/irq",
                "/proc/sys",
                "/proc/sysrq-trigger"
            ]
        },
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/5b47455a100e18ad5b4061e103e25bbb6a01668de7286325d4026504e0927bcf-init/diff:/var/lib/docker/overlay2/e82e51b32b437f106d2c4562df9597d917463cb3839c6e52c617296884e726f1/diff:/var/lib/docker/overlay2/eeaf9f8b9996c1178a9a0f740cdcd4d4721f829e9aa0d5cc6397041733ce59e0/diff:/var/lib/docker/overlay2/f0f892218a27557339f076aee450c1b748a15e310a5308673dc698ea9ad20dc0/diff:/var/lib/docker/overlay2/128289f69d29415ffe1f64a27a326222e296585358176e103c675ee8a98a50cb/diff:/var/lib/docker/overlay2/1aeac86e7554097c947ae3cf120c3975c3118818c610d96cd3cc3ec67145e534/diff:/var/lib/docker/overlay2/54d4fe6d320e6d01134025b773d7838cd4e274bae034bdde53da053ae0aee723/diff:/var/lib/docker/overlay2/05c4910c8bb6b2ad05bb94fe3cf65787c78e6e9e38df95488900e77e362d6444/diff:/var/lib/docker/overlay2/154377cb1ad18cdfe44f17df60b06642ab7c1c799e69495ffe84a18d1bf7c496/diff",
                "MergedDir": "/var/lib/docker/overlay2/5b47455a100e18ad5b4061e103e25bbb6a01668de7286325d4026504e0927bcf/merged",
                "UpperDir": "/var/lib/docker/overlay2/5b47455a100e18ad5b4061e103e25bbb6a01668de7286325d4026504e0927bcf/diff",
                "WorkDir": "/var/lib/docker/overlay2/5b47455a100e18ad5b4061e103e25bbb6a01668de7286325d4026504e0927bcf/work"
            },
            "Name": "overlay2"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "/home/nako/pi-hole/etc-dnsmasq.d",
                "Destination": "/etc/dnsmasq.d",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            },
            {
                "Type": "bind",
                "Source": "/home/nako/pi-hole/etc-pihole",
                "Destination": "/etc/pihole",
                "Mode": "rw",
                "RW": true,
                "Propagation": "rprivate"
            }
        ],
        "Config": {
            "Hostname": "42ee74fe7f2e",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "443/tcp": {},
                "53/tcp": {},
                "53/udp": {},
                "67/udp": {},
                "80/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "TZ=Europe/Madrid",
                "DNS1=127.0.0.1",
                "DNS2=1.1.1.1",
                "PATH=/opt/pihole:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "ARCH=arm64",
                "UBUNTU_SUITE=buster",
                "DOCKER_REPO=multiarch/debian-debootstrap",
                "PIHOLE_ARCH=arm64",
                "S6OVERLAY_RELEASE=https://github.com/just-containers/s6-overlay/releases/download/v2.1.0.2/s6-overlay-aarch64.tar.gz",
                "PIHOLE_INSTALL=/root/ph_install.sh",
                "PHP_ENV_CONFIG=/etc/lighttpd/conf-enabled/15-fastcgi-php.conf",
                "PHP_ERROR_LOG=/var/log/lighttpd/error.log",
                "IPv6=True",
                "S6_LOGGING=0",
                "S6_KEEP_ENV=1",
                "S6_BEHAVIOUR_IF_STAGE2_FAILS=2",
                "ServerIP=0.0.0.0",
                "FTL_CMD=no-daemon",
                "DNSMASQ_USER=root",
                "VERSION=v5.2.4"
            ],
            "Cmd": null,
            "Healthcheck": {
                "Test": [
                    "CMD-SHELL",
                    "dig +norecurse +retry=0 @127.0.0.1 pi.hole || exit 1"
                ]
            },
            "Image": "pihole/pihole:latest",
            "Volumes": {
                "/etc/dnsmasq.d": {},
                "/etc/pihole": {}
            },
            "WorkingDir": "",
            "Entrypoint": [
                "/s6-init"
            ],
            "OnBuild": null,
            "Labels": {
                "com.docker.compose.config-hash": "e26033e425537a6274d5a384778ade49877ccf8759247263592e5dfd47ad70ac",
                "com.docker.compose.container-number": "1",
                "com.docker.compose.oneoff": "False",
                "com.docker.compose.project": "pi-hole",
                "com.docker.compose.project.config_files": "docker-compose.yml",
                "com.docker.compose.project.working_dir": "/home/nako/pi-hole",
                "com.docker.compose.service": "pihole",
                "com.docker.compose.version": "1.25.0",
                "image": "pihole/pihole:v5.2.4_arm64",
                "maintainer": "adam@diginc.us",
                "url": "https://www.github.com/pi-hole/docker-pi-hole"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "78f5c6ae44df9ca485fc04dee58e86d4ab9116e7816b563fdd1b13ceec6dfb30",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "443/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "443"
                    }
                ],
                "53/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "53"
                    }
                ],
                "53/udp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "53"
                    }
                ],
                "67/udp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "67"
                    }
                ],
                "80/tcp": [
                    {
                        "HostIp": "0.0.0.0",
                        "HostPort": "80"
                    }
                ]
            },
            "SandboxKey": "/var/run/docker/netns/78f5c6ae44df",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "pi-hole_default": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": [
                        "pihole",
                        "42ee74fe7f2e"
                    ],
                    "NetworkID": "953e5b0d1b733f41115f1086c0e14f2d72abe428917060fde764c82b4e7877be",
                    "EndpointID": "370b54c4ca198127f15e7065b9545fce1becea2cdbbd361bb82e2f13bc1714ce",
                    "Gateway": "172.18.0.1",
                    "IPAddress": "172.18.0.2",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "02:42:ac:12:00:02",
                    "DriverOpts": null
                }
            }
        }
    }
]

You're null routing yourself.

This really is a problem with Docker and your configuration. The healthchecks are all passing so we know that Pi-hole is working. You'll see from the healthcheck dig output that you have things set up so that pi.hole resolves to 0.0.0.0:

ANSWER SECTION:
pi.hole.    2  IN  A  0.0.0.0

;;

I just modified a little bit the example docker-compose file, but didn't touch any server IP configuration. What's this IP, I thought that my Pi-Hole container IP was

What should I do now to fix this null routing?

I don't know, that's a better question to ask of a Docker networking person.

Alright, I'll try to figure it out myself by googling :wink: a little bit more.
But, at least you found the root problem. Thank you @DanSchaper :bowing_woman:

I finally got the Pi-Hole working:
Added a daemon.json file in /etc/docker/ directory, where the docker daemon fetches configurations files when starting.
This are the settings, forced the docker daemon to change the IP to avoid:

{
        "ip" : "127.0.0.1",
        "experimental" : false
}

Also set to Listen on all interfaces, permit all origins in the Setting > DNS tab.
Thank you for helping me out, @Bucking_Horn @DL6ER

@jfb @DanSchaper

[Mod edit: No need for double post - merged together and deduplicated]

That's not a good solution. You've just bound the entire docker daemon to localhost. You won't be able to run anything other than that single Pi-hole container.

Really?
Right now I have a container with Minecraft Server and it seems working fine :frowning:

Why not just use host network mode and do it properly? What you've done is a really bad hack that will break for you when you need it to work.

It seems pretty reasonable. I changed to host network mode by adding: network_mode: host in the docker-compose file

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