Pi cannot resolve DNS, all other devices work

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

Expected Behaviour:

Pi-hole is currently set up as the DNS and DHCP server. My router IP is 192.168.1.1, my pi static ip is 192.168.1.145. Currently all devices network devices work and ads are being blocked. However pi itself cannot connect to the DNS server (it self).

Actual Behaviour:

pi@raspi:~ $ ping wwww.google.com
ping: unknown host wwww.google.com

pi@raspi:~ $ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=54 time=14.3 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=54 time=11.6 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=54 time=12.2 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 11.676/12.737/14.305/1.138 ms

# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname
interface eth0
        static ip_address=192.168.1.145/24
        static routers=192.168.1.1
        static domain_name_servers=127.0.0.1

Debug Token:

pihole_debug.txt (20.1 KB)

Make sure /etc/resolv.conf is set to use either an external DNS or 127.0.0.1

@Mcat12, thanks for the reply! I edited the /etc/dhcpcd.conf and not the /etc/resolv.conf as the resolv file said not to. Attached are both maybe you could see my mistake? I have tried setting the dhcpcd.conf file to 8.8.8.8 and that does not work either.

resolv.txt (172 Bytes)
dhcpcd.txt (1.4 KB)

What is the output of dig www.google.com?

@Mcat12

pi@raspi:~ $ dig www.google.com

; <<>> DiG 9.9.5-9+deb8u17-Raspbian <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 12532
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1452
;; QUESTION SECTION:
;www.google.com.			IN	A

;; Query time: 32 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Aug 02 23:36:53 PDT 2019
;; MSG SIZE  rcvd: 43

Check /var/log/pihole.log for the log entries related to that request and share them.

Umm it doesn't appear to be logging the request. But I don't claim to have fully understant everything in the log.

Sorry my date/time is wrong on the pi.

pi@raspi:~ $ date
Sat  3 Aug 00:01:35 PDT 2019
Aug  2 12:58:25 dnsmasq[5821]: started, version pi-hole-2.80 cachesize 10000
Aug  2 12:58:25 dnsmasq[5821]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth DNSSEC loop-detect inotify dumpfile
Aug  2 12:58:25 dnsmasq[5821]: DNSSEC validation enabled
Aug  2 12:58:25 dnsmasq[5821]: configured with trust anchor for <root> keytag 20326
Aug  2 12:58:25 dnsmasq[5821]: configured with trust anchor for <root> keytag 19036
Aug  2 12:58:25 dnsmasq-dhcp[5821]: DHCP, IP range 192.168.1.100 -- 192.168.1.251, lease time 1d
Aug  2 12:58:25 dnsmasq[5821]: using nameserver 2606:4700:4700::1001#53
Aug  2 12:58:25 dnsmasq[5821]: using nameserver 2606:4700:4700::1111#53
Aug  2 12:58:25 dnsmasq[5821]: using nameserver 1.0.0.1#53
Aug  2 12:58:25 dnsmasq[5821]: using nameserver 1.1.1.1#53
Aug  2 12:58:25 dnsmasq[5821]: read /etc/hosts - 5 addresses
Aug  2 12:58:25 dnsmasq[5821]: read /etc/pihole/local.list - 4 addresses
Aug  2 12:58:25 dnsmasq[5821]: failed to load names from /etc/pihole/black.list: No such file or directory
Aug  2 12:58:26 dnsmasq[5821]: read /etc/pihole/gravity.list - 114978 addresses
Aug  2 16:32:04 dnsmasq-dhcp[5821]: DHCPREQUEST(eth0) 192.168.1.226 d4:a3:3d:33:28:7f 
Aug  2 16:32:04 dnsmasq-dhcp[5821]: DHCPACK(eth0) 192.168.1.226 d4:a3:3d:33:28:7f Daniels-iPhone
Aug  2 16:44:25 dnsmasq-dhcp[5821]: DHCPDISCOVER(eth0) 7c:2e:bd:64:39:5e 
Aug  2 16:44:25 dnsmasq-dhcp[5821]: DHCPOFFER(eth0) 192.168.1.239 7c:2e:bd:64:39:5e 
Aug  2 16:44:25 dnsmasq-dhcp[5821]: DHCPREQUEST(eth0) 192.168.1.239 7c:2e:bd:64:39:5e 
Aug  2 16:44:25 dnsmasq-dhcp[5821]: DHCPACK(eth0) 192.168.1.239 7c:2e:bd:64:39:5e Chromecast
Aug  2 20:20:36 dnsmasq-dhcp[5821]: DHCPREQUEST(eth0) 192.168.1.237 80:e6:50:00:bc:1e 
Aug  2 20:20:36 dnsmasq-dhcp[5821]: DHCPACK(eth0) 192.168.1.237 80:e6:50:00:bc:1e Daniels-MBP
Aug  2 20:48:26 dnsmasq-dhcp[5821]: DHCPREQUEST(eth0) 192.168.1.226 d4:a3:3d:33:28:7f 
Aug  2 20:48:26 dnsmasq-dhcp[5821]: DHCPACK(eth0) 192.168.1.226 d4:a3:3d:33:28:7f Daniels-iPhone
Aug  2 21:45:29 dnsmasq-dhcp[5821]: DHCPREQUEST(eth0) 192.168.1.226 d4:a3:3d:33:28:7f 
Aug  2 21:45:29 dnsmasq-dhcp[5821]: DHCPACK(eth0) 192.168.1.226 d4:a3:3d:33:28:7f Daniels-iPhone
Aug  2 22:07:29 dnsmasq-dhcp[5821]: DHCPREQUEST(eth0) 192.168.1.104 30:35:ad:da:94:ae 
Aug  2 22:07:29 dnsmasq-dhcp[5821]: DHCPACK(eth0) 192.168.1.104 30:35:ad:da:94:ae Choons-Air
Aug  2 22:11:17 dnsmasq-dhcp[5821]: DHCPREQUEST(eth0) 192.168.1.104 30:35:ad:da:94:ae 
Aug  2 22:11:17 dnsmasq-dhcp[5821]: DHCPACK(eth0) 192.168.1.104 30:35:ad:da:94:ae Choons-Air
Aug  2 22:31:08 dnsmasq-dhcp[5821]: DHCPREQUEST(eth0) 192.168.1.237 80:e6:50:00:bc:1e 
Aug  2 22:31:08 dnsmasq-dhcp[5821]: DHCPACK(eth0) 192.168.1.237 80:e6:50:00:bc:1e Daniels-MBP
Aug  2 22:38:29 dnsmasq-dhcp[5821]: DHCPREQUEST(eth0) 192.168.1.226 d4:a3:3d:33:28:7f 
Aug  2 22:38:29 dnsmasq-dhcp[5821]: DHCPACK(eth0) 192.168.1.226 d4:a3:3d:33:28:7f Daniels-iPhone
Aug  2 22:39:22 dnsmasq-dhcp[5821]: DHCPREQUEST(eth0) 192.168.1.226 d4:a3:3d:33:28:7f 
Aug  2 22:39:22 dnsmasq-dhcp[5821]: DHCPACK(eth0) 192.168.1.226 d4:a3:3d:33:28:7f Daniels-iPhone
Aug  2 23:28:03 dnsmasq-dhcp[5821]: DHCPREQUEST(eth0) 192.168.1.237 80:e6:50:00:bc:1e 
Aug  2 23:28:03 dnsmasq-dhcp[5821]: DHCPACK(eth0) 192.168.1.237 80:e6:50:00:bc:1e Daniels-MBP
Aug  2 23:28:51 dnsmasq-dhcp[5821]: DHCPREQUEST(eth0) 192.168.1.237 80:e6:50:00:bc:1e 
Aug  2 23:28:51 dnsmasq-dhcp[5821]: DHCPACK(eth0) 192.168.1.237 80:e6:50:00:bc:1e Daniels-MBP
Aug  2 23:56:37 dnsmasq-dhcp[5821]: DHCPREQUEST(eth0) 192.168.1.212 18:65:71:7c:9a:35 
Aug  2 23:56:37 dnsmasq-dhcp[5821]: DHCPACK(eth0) 192.168.1.212 18:65:71:7c:9a:35 amazon-565d5e3d1

Since you have enabled DNSSEC, you need to have the correct time set.

@Mcat12 Yess!! thank you! I disabled DNSSEC, updated my date/time on pi, reenabled and everything works!! THANK YOU :slight_smile: