Hello I'm new in the forum =) I'm from Spain and sorry for my English.
I have a doubt about how Pi-hole works. Actually I'm runnig Pi-hole in my raspberry, and I configured my Raspberry's IP address as DNS on my smartphone (Android).
Pi-hole seems to be working fine in my smartphone, blocks ads on websites, It's Ok. But when I run in console (Termux App in my smartphone) the command: "dig anywebsite.com" to see what DNS my smartphone is using the result say that the DNS server in use is SERVER: 8.8.8.8#53(8.8.8.8) Google's DNS I know.
What is the reason? Maybe something escapes me for understand what is happenig.
Welcome to the forum, and your English is fine (much better than my Spanish ).
Your debug log shows that your Pi-hole is working normally.
The terminal command from the client smartphone does appear to show that that request went to a Google server. Run these two commands from the Termux app on the phone and post the results:
PS: I don't know if this is helpful, but if I access to https://www.dnsleaktest.com/ and I run the standard test the result says this:
IP Hostname ISP Country
188.114.. None Cloudflare Spain
That client is not using Pi-hole for DNS. The first nslookup went to the designated DNS server (which is a Google DNS server). The second forced the command to go to Pi-hole, which received the request and returned the correct answer.
I would look on a forum for your model phone and OS for a solution on how to assign DNS on that device.
Thank you again jfb. I will search, but I thought that was enough with change DNS address in "Advanced Options" in my Wifi configuration in my smarthphone, that is a S10+
But I am surprised that on my smartphone, the websites do not show ads, and in the Pi-hole web panel it appears as a client.
Thank you again I will search and if I find the solution I will said here!
Yup, you have to do weird things now to check DNS servers configured like set a static IP and DNS but dont apply.
When go this path, Android will auto fill these DNS settings received via DHCP in the static configuration screen.
Or install a network app.
So eHakkelaar you say that Termux bypasses the DNS that I have set on my smartphone, OK I understand a little, on the other hand, if I use the command you mention"getprop" in Termux, I see a very long list but I don't anything about DNS references.
This would explain why no ads are seen on the phone and it is a Pi-hole client in the Pi-hole web UI.
Does it mean that I managed to configure everything correctly?
Sorry for bombing questions I want learn. Thanks for yours answers.
EDIT:
:I use the command you mention"getprop" in Termux, I see a very long list but I don't anything about DNS references.
Sorry I understood I should use that command, and i just understood that it doesn't work to see DNS anymore. All because of my bad English.