Somewhere along this thread, I've lost track of the problem. The local dig working and external IP dig not working was a problem on the Pi (from the Pi terminal), a client, or both?
Please post the exact commands you are running from both the Pi terminal and client, along with the complete output of the commands.
I assume the Pi is visible on your network at the 170 IP? Are you using ssh to the Pi via port 22, or do you control the Pi via a keyboard and mouse and monitor?
Also, please generate a Pi-Hole debug log, upload it when prompted and post the token here.
Yes, I can ssh to 192.168.0.170. That's the way I use my pi.
Can't post a debug log because I'm using arch.
Pi-hole debug options are disabled.
ArchLinux distribution of Pi-hole is not supported by official project and this debug report CAN NOT be uploaded to their debug team.
Follow instructions carefully on the project wiki page (Pi-hole - ArchWiki) and please refer to AUR package web page for support and debugging (AUR (en) - pi-hole-server).
Apologies - I see you posted Arch in an earlier reply. Since Arch isn't a supported platform and we can't get a debug log, I don't think we'll be able to help much. I would head over to the Arch Pi-Hole site and see what they can offer.
It does appear that something is blocking port 53 traffic to the Pi.
Check if interface configured for Pi-hole is the same as the one holding IP 192.168.0.170:
grep PIHOLE_INTERFACE /etc/pihole/setupVars.conf
ip a
Could be rebind protection:
If suspect rebind protection and cant find any settings related in the router settings, you could connect a PC/laptop configured with static IP directly to the Pi-hole box (no router/switch inbetween) to see if replies to dig/nslook/host etc.
;; communications error to 192.168.0.170#53: end of file
;; communications error to 192.168.0.170#53: end of file
;; communications error to 192.168.0.170#53: end of file
;; communications error to 192.168.0.170#53: end of file
grep PIHOLE_INTERFACE /etc/pihole/setupVars.conf
PIHOLE_INTERFACE=tun0
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
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether b9:23:ec:de:c3:12 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.170/24 brd 192.168.0.255 scope global dynamic eth0
valid_lft 2142sec preferred_lft 2142sec
inet 192.168.0.171/24 brd 192.168.0.255 scope global secondary noprefixroute eth0
valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether d2:4e:4f:35:8d:e4 brd ff:ff:ff:ff:ff:ff
4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 100
link/none
inet x.x.x.x/24 brd x.x.x.x scope global noprefixroute tun0
valid_lft forever preferred_lft forever