Pi-hole is not working

First of all, sorry for the unspecific topic title, but I really don't know which detail causes my pi-hole not to perform DNS resolution. The web interface works perfectly. The command "pihole -r" runs through without problems.
However, DNS resolution does not work if I specify the IP of the pi-hole as DNS for devices. I have tested this with different clients (iPhone, PC, Mac), all with the same result: No internet pages can be opened. In the overview page of the web interface no queries are displayed.

In the settings of pi-hole I have set the following under DNS server:

On the left side I have not checked any checkboxes for upstream DNS servers. On the right side I have made the following settings:
Custom 1 (IPv4): 192.168.178.1#53
Custom 3 (IPv6): fd00::87e:d167:c50:5dd7#53
These are the IP addresses of my FritzBox, which then uses the default ISP DNS servers. Where the #53 at the end comes from, I don't know. It was set automatically after saving.

Advanced DNS settings
[unchecked] Never forward non-FQDNs
[:heavy_check_mark:] Never forward reverse lookups for private IP ranges
[unchecked] Use DNSSEC
Conditional Forwarding
[:heavy_check_mark:] Use Conditional Forwarding
IP of your router: 192.168.178.1
Local domain name: fritz.box

pi-hole runs with me on a Raspberry Pi B+. My router is a Fritz!Box 7590. As soon as pi-hole works as a DNS server via manual entry within the clients, I wanted to distribute the DNS server to the clients via DHCP and enter my Fritzbox as upstream DNS server in pi-hole.

I have created a debug log via the web interface. This can be found here:
https://tricorder.pi-hole.net/ujgxjjxdve

I hope someone can help me.

Dont know where is configured on Fritzbox:

https://discourse.pi-hole.net/search?q=fritzbox%20rebind%20protection

In the settings for DNS rebind protection in the FritzBox I entered the ip and the domain name of the pi-hole

From your debug log, connectivity problemis shown:

*** [ DIAGNOSING ]: Networking
[✗] No IPv4 address(es) found on the eth0 interface.

[✗] No IPv6 address(es) found on the eth0 interface.

[i] Default IPv4 gateway: 192.168.178.1
   * Pinging 192.168.178.1...
[✗] Gateway did not respond. (https://discourse.pi-hole.net/t/why-is-a-default-gateway-important-for-pi-hole/3546)

[i] Default IPv6 gateway: fe80::e228:6dff:fe7b:2787
   * Pinging fe80::e228:6dff:fe7b:2787...
[✗] Gateway did not respond. (https://discourse.pi-hole.net/t/why-is-a-default-gateway-important-for-pi-hole/3546)

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] red.as-us.falkag.net is 0.0.0.0 via localhost (127.0.0.1)
[✗] Failed to resolve red.as-us.falkag.net via Pi-hole (192.168.178.2)

*** [ DIAGNOSING ]: Setup variables
    PIHOLE_INTERFACE=eth0
    IPV4_ADDRESS=192.168.178.2/24

Is there a way to find the cause of this connection problem? If I use ssh to log in on the Raspberry, I can reach the gateway (Fritzbox) via "ping 192.168.178.1" without any problems. Also a ping to google.de gives an answer.
What about "No IPv4 address(es) found on the eth0 interface." meant? I have configured the IP address 192.168.178.2 for the pi-hole in the FritzBox.
In the file "/etc/dhpcd.conf" the following is entered at the very end:

interface eth0
static ip_address=192.168.178.2/24
static routers=192.168.178.1
static domain_name_servers=192.168.178.1

So it almost looks like only the pi-hole process has connection problems. What could be the reason for this?

Did you do this after my posting about rebind protection ?
Can you resolve now when run below on one of your clients (Windows/MacOS/Linux) ?

nslookup pi.hole 192.168.178.2

And whats output for above when run on Pi-hole ?

Can you post IP's on the interfaces for Pi-hole (might want to redact global public IPv6 if any) ?

ip a

Post routes ?

ip r

Did you do this after my posting about rebind protection ?

The entries (192.168.178.2/pi.hole) I had already entered the whole time in the FritzBox at host exceptions for DNS rebind protection. I had read this here in the forum in a guide for setting up pihole with FritzBox.

Can you resolve now when run below on one of your clients (Windows/MacOS/Linux) ?
nslookup pi.hole 192.168.178.2

C:\Users\andre>nslookup pi.hole 192.168.178.2
DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown
Address:  192.168.178.2

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
*** Zeitüberschreitung bei Anforderung an UnKnown.

This is the output for the command "ipconfig" under windows. I have disabled the IPv6 protocol on Windows as a test to see if this is the problem.

Ethernet-Adapter Ethernet:

   Verbindungsspezifisches DNS-Suffix: fritz.box
   Beschreibung. . . . . . . . . . . : Realtek PCIe GbE Family Controller
   Physische Adresse . . . . . . . . : 2C-F0-5D-05-E1-30
   DHCP aktiviert. . . . . . . . . . : Ja
   Autokonfiguration aktiviert . . . : Ja
   IPv4-Adresse  . . . . . . . . . . : 192.168.178.32(Bevorzugt)
   Subnetzmaske  . . . . . . . . . . : 255.255.255.0
   Lease erhalten. . . . . . . . . . : Dienstag, 2. Juni 2020 11:10:20
   Lease läuft ab. . . . . . . . . . : Freitag, 12. Juni 2020 13:08:36
   Standardgateway . . . . . . . . . : 192.168.178.1
   DHCP-Server . . . . . . . . . . . : 192.168.178.1
   DNS-Server  . . . . . . . . . . . : 192.168.178.2
   NetBIOS über TCP/IP . . . . . . . : Aktiviert

And whats output for above when run on Pi-hole ?

pi@PIHOLE:~ $ nslookup pi.hole 192.168.178.2

;; connection timed out; no servers could be reached

Can you post IP's on the interfaces for Pi-hole (might want to redact global public IPv6 if any) ?
ip a
Post routes ?
ip r


pi@PIHOLE:~ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enxb827ebe8aa91: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:e8:aa:91 brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.2/24 brd 192.168.178.255 scope global dynamic noprefixroute enxb827ebe8aa91
       valid_lft 533793sec preferred_lft 425793sec
    inet6 fd00::87e:d167:c50:5dd7/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 7009sec preferred_lft 3409sec
    inet6 2003:e6:5719:c200:b595:6c3:300e:873c/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 7009sec preferred_lft 1609sec
    inet6 fe80::a552:c7f7:3aa0:78c4/64 scope link
       valid_lft forever preferred_lft forever

pi@PIHOLE:~ $ ip r
default via 192.168.178.1 dev enxb827ebe8aa91 proto dhcp src 192.168.178.2 metric 202
192.168.178.0/24 dev enxb827ebe8aa91 proto dhcp scope link src 192.168.178.2 metric 202

Do you have IPv6 support upstream from your ISP ?

https://ipv6-test.com/

Output for below four pls ?

sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:547 \|:471[1-8] '

journalctl -u pihole-FTL | tail -20

sudo grep -v '^\s*#\|^\s*$' -R /etc/dnsmasq.* | sort | sed 's\:\ \' | column -t

sudo iptables -nL

Do you have IPv6 support upstream from your ISP ?
https://ipv6-test.com/

I think so. This is the output of the linked website (without pihole as DNS server of course)

sudo netstat -nltup | grep 'Proto|:53 |:67 |:80 |:547 |:471[1-8] '

pi@PIHOLE:~ $ sudo netstat -nltup | grep 'Proto\|:53 \|:67 \|:80 \|:547 \|:471[1-8] '
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:4711          0.0.0.0:*               LISTEN      505/pihole-FTL
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      355/lighttpd
tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      505/pihole-FTL
tcp6       0      0 ::1:4711                :::*                    LISTEN      505/pihole-FTL
tcp6       0      0 :::80                   :::*                    LISTEN      355/lighttpd
tcp6       0      0 :::53                   :::*                    LISTEN      505/pihole-FTL
udp        0      0 0.0.0.0:53              0.0.0.0:*                           505/pihole-FTL
udp6       0      0 :::53                   :::*                                505/pihole-FTL

journalctl -u pihole-FTL | tail -20

pi@PIHOLE:~ $ journalctl -u pihole-FTL | tail -20
-- Logs begin at Fri 2020-05-29 16:28:27 BST, end at Wed 2020-06-03 22:19:07 BST. --
May 29 16:28:42 PIHOLE systemd[1]: Starting LSB: pihole-FTL daemon...
May 29 16:28:43 PIHOLE pihole-FTL[239]: Not running
May 29 16:28:47 PIHOLE su[346]: (to pihole) root on none
May 29 16:28:47 PIHOLE su[346]: pam_unix(su:session): session opened for user pihole by (uid=0)
May 29 16:28:59 PIHOLE pihole-FTL[239]: FTL started!
May 29 16:28:59 PIHOLE systemd[1]: Started LSB: pihole-FTL daemon.

sudo grep -v '^\s*#|^\s*$' -R /etc/dnsmasq.* | sort | sed 's:\ ' | column -t

pi@PIHOLE:~ $ sudo grep -v '^\s*#\|^\s*$' -R /etc/dnsmasq.* | sort | sed 's\:\ \' | column -t
/etc/dnsmasq.conf              conf-dir=/etc/dnsmasq.d
/etc/dnsmasq.conf.old          conf-dir=/etc/dnsmasq.d
/etc/dnsmasq.d/01-pihole.conf  addn-hosts=/etc/pihole/custom.list
/etc/dnsmasq.d/01-pihole.conf  addn-hosts=/etc/pihole/local.list
/etc/dnsmasq.d/01-pihole.conf  bogus-priv
/etc/dnsmasq.d/01-pihole.conf  cache-size=10000
/etc/dnsmasq.d/01-pihole.conf  interface=eth0
/etc/dnsmasq.d/01-pihole.conf  localise-queries
/etc/dnsmasq.d/01-pihole.conf  local-ttl=2
/etc/dnsmasq.d/01-pihole.conf  log-async
/etc/dnsmasq.d/01-pihole.conf  log-facility=/var/log/pihole.log
/etc/dnsmasq.d/01-pihole.conf  log-queries
/etc/dnsmasq.d/01-pihole.conf  no-resolv
/etc/dnsmasq.d/01-pihole.conf  server=/178.168.192.in-addr.arpa/192.168.178.1
/etc/dnsmasq.d/01-pihole.conf  server=192.168.178.1#53
/etc/dnsmasq.d/01-pihole.conf  server=fd00::87e:d167:c50:5dd7#53
/etc/dnsmasq.d/01-pihole.conf  server=/fritz.box/192.168.178.1
/etc/dnsmasq.d/01-pihole.conf  server=/use-application-dns.net/

sudo iptables -nL


pi@PIHOLE:~ $ sudo iptables -nL
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Thanks for the help. That's really very nice. I'd be pretty much lost without your help on this issue.

1 Like

Pi-hole seems to be configured to answer on the eth0 interface.
But from below ip a, the interface is actually named enxb827ebe8aa91:

Try select reconfigure and configure proper interface:

pihole -r

And test from client & Pi-hole:

nslookup pi.hole 192.168.178.2

:partying_face: It's finally working.

It was actually because the network interface had been given a cryptic name and was no longer called eth0. I have no idea how this could happen. It is "Raspberry Pi OS (32-bit) Lite
Minimal image based on Debian Buster - Kernel version: 4.19".
The solution is as follows:
1 sudo raspi-config
2 Select "2. Network options"
3 Select "N3 Network interface names"
4 Select "No". It's now disabled predictable network interface names.
5 Click "OK" and "Finish". Then it will reboot your raspberry pi.

Thanks for your help

1 Like