I am getting a ping failure from an Android terminal (Termux) but it works OK from my other computers on the LAN. There are some similar posts but nothing quite like what I see.
This is the set up I have:
- A registered site = 'kinshamservers.org.uk'. I can ping this from all my computers and get the expected IP - OK
- Pihole on RPI is my DHCP server and DNS
- Local LAN with a variety of devices using Android/iOS/MacOS/Raspian/Debian10 and various flavors of Linux in embedded devices
- A records on Pihole pointing to local devices and computers. I can ping all these from all my computers (Android/Mac/Raspian/Debian10) - OK
- CNAME record on Pihole = testy.kinshamservers.org.uk pointing to kinshamservers.org.uk. I can ping testy... from everything except Android where I get "unknown host" resonse - NOTOK. This is the error that puzzles me.
Diagnostics
dig returns a correct response when executed on all my computers, e.g. from MAC
chriswilkinson@MacBook ~ % dig kinshamservers.org.uk
; <<>> DiG 9.10.6 <<>> kinshamservers.org.uk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29896
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;kinshamservers.org.uk. IN A
;; ANSWER SECTION:
kinshamservers.org.uk. 1205 IN A 84.39.117.57 <<<< correct
;; Query time: 81 msec
;; SERVER: 192.168.1.73#53(192.168.1.73) <<<< correct = RPI DNS
;; WHEN: Wed Aug 04 14:30:25 BST 2021
;; MSG SIZE rcvd: 66
dig returns the correct response from computers other than Android, again e.g. from MAC
chriswilkinson@MacBook ~ % dig testy.kinshamservers.org.uk
; <<>> DiG 9.10.6 <<>> testy.kinshamservers.org.uk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2314
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;testy.kinshamservers.org.uk. IN A
;; ANSWER SECTION:
testy.kinshamservers.org.uk. 2 IN CNAME kinshamservers.org.uk.
kinshamservers.org.uk. 936 IN A 84.39.117.57
;; Query time: 165 msec
;; SERVER: 192.168.1.73#53(192.168.1.73)
;; WHEN: Wed Aug 04 14:34:54 BST 2021
;; MSG SIZE rcvd: 107
dig is not giving the expected answer when executed in a Termux Android terminal.
$ dig testy.kinshamservers.org.uk
; <<>> DiG 9.16.11 <<>> testy.kinshamservers.org.uk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 41361
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;testy.kinshamservers.org.uk. IN A
;; AUTHORITY SECTION:
kinshamservers.org.uk. 599 IN SOA ns11.domaincontrol.com. dns.jomax.net. 2021080216 28800 7200 604800 600
;; Query time: 90 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Wed Aug 04 14:53:46 BST 2021
;; MSG SIZE rcvd: 127
So that seems to comport with the ping error.
- If I specify Pihole as the DNS then I get a correct response
$dig @192.168.1.73 testy.kinshamservers.org.uk
; <<>> DiG 9.16.11 <<>> @192.168.1.73 testy.kinshamservers.org.uk
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34358
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;testy.kinshamservers.org.uk. IN A
;; ANSWER SECTION:
testy.kinshamservers.org.uk. 2 IN CNAME kinshamservers.org.uk.
;; Query time: 30 msec
;; SERVER: 192.168.1.73#53(192.168.1.73)
;; WHEN: Wed Aug 04 16:02:15 BST 2021
;; MSG SIZE rcvd: 91
I tried setting Android to static IP with DNS pointing to Pihole but that didn't make any difference - same issue. I've reverted to DHCP now so it should be getting its DNS from Pihole DHCP.
All this seems to suggest that there is nothing wrong with Pihole configuration but that Android has some issue. Is there something different about Android that would explain this failure?