iPhone does not use pi-hole despite having dns set manually in settings

Expected Behaviour:

iPhone XS Max should query pi-hole for DNS requests.

Actual Behaviour:

iPhone XS Max sends mDNS requests to 224.0.0.251 through pi-hole server.

Debug Token:

https://tricorder.pi-hole.net/iwmwdn7yeh

So, I’ve used a wireshark on the pi-hole box and found that my iPhone won’t send normal DNS queries to it. I’ve set the iPhone DNS for my wifi manually to the pi-hole. I’ve sifted through several topics on reddit and these forums, but have yet to find a solution. All other devices on my network query DNS through pi-hole. I even set my parent’s computers to run through a VPN on my router and they query through the pi-hole.

The pi-hole is my DHCP, and it is disabled in the router. The pi-hole IP is static. The iPhone is running iOS 13.2 Developer Beta (unless that’s actually already out, I dropped the beta recently).

Thank you for your time.

That is a multicast DNS request directed at your local network’s appropriate multicast address and meant to resolve names on your local network.
It is normal for an Apple device to apply DNS as well as mDNS (Bonjour) to communicate on the local network, and not uncommon for Android, Linux or even Windows machines (at least for trying to allocate local network printers).

If this is the only issue causing your concern, I wouldn’t worry about it.

You could verify that your iPhone is using Pi-hole as DNS server by examining your Pi-hole’s Query Log for corresponding entries.
If you don’t see entries for your iPhone, someone with proper authorisation like a mod or developer can take a look at your debug token and provide further insights.

That makes sense. But like I said, there are no queries from my iPhone going through the pi-hole. It’s driving me bonkers.

At one point I had an Arch Linux setup running pi-hole and my iPhone would query it. Once I switched to Lubuntu (I wanted a supported distro for problems like this) it stopped working.

Another theory I have is that because my pi-hole is connected directly to the gateway it isn’t working. If I move it to an AP then it might work. I’ll have to get a switch while I’m out today to test my theory.

Double check the DNS settings on the iPhone. From settings, select WiFi and the information button next to your WiFi SSID. From there, ensure the IP is on the same range as the Pi-Hole and ensure that the DNS entry is for Pi-Hole. Check that in the manual settings, the only DNS listed is the Pi-Hole, and nothing else. In the screen captures below, DNS is manually mapped to a pair of Pi-Holes, since I want this device to use different DNS settings than provided by the DHCP server.

Unrelated to this problem, in your debug log there are a number of database permissions errors.

-----tail of pihole-FTL.log------
   [2019-10-14 21:34:00.143 16379] dbquery(INSERT INTO network (ip,hwaddr,interface,firstSeen,lastQuery,numQueries,name,macVendor) VALUES ('192.168.1.6','3c:8d:20:f4:65:52','enp5s0',1571106840, 0, 0, '', 'Google, Inc.');) - SQL error (8): attempt to write a readonly database
   [2019-10-14 21:34:00.143 16379] check_database(8): Disabling database connection due to error
   [2019-10-14 21:34:00.148 16379] SQLite3 message: statement aborts at 21: [INSERT INTO network (ip,hwaddr,interface,firstSeen,lastQuery,numQueries,name,macVendor) VALUES ('192.168.1.29','00:ff:db:df:c0:9d','enp5s0',1571106840, 0, 0, '', '');] attempt to write (8)
   [2019-10-14 21:34:00.148 16379] dbquery(INSERT INTO network (ip,hwaddr,interface,firstSeen,lastQuery,numQueries,name,macVendor) VALUES ('192.168.1.29','00:ff:db:df:c0:9d','enp5s0',1571106840, 0, 0, '', '');) - SQL error (8): attempt to write a readonly database
   [2019-10-14 21:34:00.148 16379] check_database(8): Disabling database connection due to error

Check the permissions on your database. They should be as follows:

ls -lh /etc/pihole/pihole-FTL.db
-rw-r--r-- 1 pihole pihole 265M Oct 15 09:30 /etc/pihole/pihole-FTL.db

Corrected the DB issue by deleting the DB and repairing pi-hole. No progress (as you said, unrelated to) on the problem.

Attached are three images. My connection to my network, the manual DNS setting, and the settings page of my pi-hole.

All these settings were in place prior to this thread.):

Edit: lol I forgot I tried that funny thing with using the gateway. I’ve since changed it to 192.168.1.2 and am testing.

Yes, even with the DNS set manually to the pi-hole it isn’t querying DNS through pi-hole ):

Hmm.
Those above pictures by you show Pi-hole’s IP address as 192.168.1.2
However, your iPhone’s settings show your router’s IP 192.168.1.1 also being configured as your DNS server.
This would mean that your iPhone indeed did not use Pi-hole, but rather solicited DNS requests via your router while those settings were in effect.

Try using your Pi-hole’s IP 192.168.1.2 as DNS server instead.

Also, not sure what you are trying to convey by:

Your screenshots do not show an entry labeled gateway.
What did you change or configure?

My gateway address is 192.168.1.1. Another thread suggested I try setting the upstream DNS in pi-hole to 192.168.1.1 and then my iphone to 192.168.1.1. That didn’t work.

I’ve since corrected the DNS in my iPhone to the pi-hole IP address, being 192.168.1.2. I still have no queries through my pihole from my iPhone.

I see. So your screenshots actually represent your configuration while testing that proposal (which does not provide a working solution).

Assuming you otherwise(i.e. apart from DNS servers back to 192.168.1.2) stick to the screenshot settings:
Is your iPhone (manual configured to 192.168.1.3) listed in the Network section of Pi-hole’s admin interface?
If so, what name does it use? Is that name showing up in Pi-hole’s Query Log?

(Can hear and see a thunderstorm closing in on my location, so might be forced to jump off the net for while)

Check your IOS settings to ensure you don’t have WiFi assist or any similar feature turned on. If you have a weak WiFi signal (which it appears you do not), data goes to the cell network and bypasses your local LAN service. To test, disable the cell service on the phone.

It does not appear that the phone is getting an IPv6 IP, but also ensure you don’t have IPv6 enabled on the router.

The only settings that are different from the screenshot is the DNS server change.

I’ll have to check when I get home after 5. Currently, the iPhone has a static route issued through the pi-hole (which I also put into the phone itself, which I think may be redundant?). But again, there are NO queries listed for the iPhone’s name(literally just “iPhone”) or address.

Since you are using Pi-Hole as DHCP server, there should be no reason to manually set the IOS DNS or IP settings. Is the problem that when you set the phone to Automatic for IP and DNS, it does not receive an IP address from Pi-Hole? You can check in /var/log/pihole.log for details of the DHCP transactions when the phone connects.

I believe that as of now, the latest stable IOS is 13.1.3. You might want to revert to that if you can’t resolve the problem on that version of IOS.

When I get home I will set everything to automatic for the iPhone. If that doesn’t work, I will roll back the iOS to 13.1.3.

Thank you for your help.

Changing the iPhone settings to automatic for the network did not solve it.

The iPhone still won’t query the pi-hole on iOS 13.1.3.

The phone did receive an IP address from the Pi-Hole DHCP server?

Try clearing the IOS DNS cache with a toggle to airplane mode and back.

The iPhone queries until the last query you see there. After that, it doesn’t query anymore.

I’m not seeing any cause here. I do note that the iPhone seems to be querying a lot of NXDOMAIN names.

The query log shows that the iPhone is using Pi-Hole, which seems to correct your original problem. It stops querying after a period of time for an unknown reason.

So do I need to mark this thread solved and start another?

I’m not sure this forum can resolve this. It appears to be an iPhone issue.