Expected Behaviour:
From a command prompt on my pihole server, I should get valid server results as shown in the following
$ dig google.com
; <<>> DiG 9.16.1-Ubuntu <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9099
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 21 IN A 172.217.1.142
;; Query time: 4 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Sun May 31 15:36:19 CDT 2020
;; MSG SIZE rcvd: 55
Actual Behaviour:
$ dig google.com
; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> google.com
;; global options: +cmd
;; connection timed out; no servers could be reached
I've noticed this error, but cannot figure out why the connection is refused
$ canonical-livepatch status
last check: 1 week ago
kernel: 4.15.0-99.100-generic
server check-in: failed: livepatch check failed: cannot send request: Put https://livepatch.canonical.com/api/machine/f2f61e9daca3132ede8070c45bac68ca: dial tcp: lookup livepatch.canonical.com on 127.0.0.53:53: read udp 127.0.0.1:51733->127.0.0.53:53: read: connection refused
The following work, where the IP of the pihole server is 192.168.52.36. Also pihole is working fine for all clients on my LAN, just not for itself.
$ dig @127.0.0.1 google.com
$ dig @192.168.52.36 google.com
Debug Token:
https://tricorder.pi-hole.net/r41gfzxivc
To upload this I had to change /etc/resolv.conf from:
$ ll resolv.conf
lrwxrwxrwx 1 root root 29 May 31 10:11 resolv.conf -> ../run/resolvconf/resolv.conf
$ cat /run/resolvconf/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 127.0.0.53
search localdomain
to:
$ ll resolv.conf
lrwxrwxrwx 1 root root 34 May 31 10:42 resolv.conf -> ../run/systemd/resolve/resolv.conf
$ cat /run/systemd/resolve/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 192.168.52.36
search localdomain