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
[] Never forward reverse lookups for private IP ranges
[unchecked] Use DNSSEC Conditional Forwarding
[] 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.
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:
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.
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
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.
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.