2

First of all, my apologies if I'm posting in the wrong forum. I'm a bit lost in the SE galaxy. But since my issue is quite complex and specific, I feel this is the best place. Let me know if I'm wrong.

So for the issue:

  1. I'm using a home router, lent by my service provider. It's local IPv4 is 192.168.1.254.
  2. I have a raspberry pi (IP 192.168.1.15) running a dns service (and ad-blocker) called pihole, configured to use unbound (full recursive dns) on the same machine as its upstream source.
  3. The router is running a dhcp service and points to the raspberry as the default dns server.

I have no problem on my computers, either in wifi or ethernet. Network configuration is alright, DNS is indeed coming from the pi.

Now I want my nexus 6P using the latest version of android to be able to use wifi at home. So I simply connect it to the router wifi, same as I did with my laptop, which is doing great. However, the smartphone is doing his own stuff. Sometimes all will be great, and more often than not, it will drop the wifi saying that there is no internet connection.

Of course I tried a bunch of stuff:

  • Setting network configuration in the phone instead of letting DHCP do its job, no change.
  • Changing wifi channel, no change.
  • Rebooting router, phone, and both, no change.
  • Whitelisting google services like ad service gstatic check and whatever appeared in my pihole admin panel: seemed to solve the problem at the moment, but a few days later, not that great. And not really what I want.
  • Try both "google" and "no provider" as wifi quality check provider in the android wifi settings. No effect.
  • Use external DNS servers like 1.1.1.1 or 8.8.8.8: seems to do the job. But absolutely not my goal.

Note that dns request going through the pi can take up to 1 sec to be answered since it's doing a full recursive search. And I suspect the problem is coming from here.

So does anyone have any idea how to get my phone to stick on this wifi network? Btw, my phone is not rooted and I'd like to avoid going down this road.

3
  • Don’t do recursive lookups with your own DNS server. That’s not even best practice in a corporate environment. There is no reason for it. Forward your requests to your ISP’s provided DNS servers. No DNS query should be taking 1 second.
    – Appleoddity
    Oct 9, 2018 at 14:02
  • 1
    I don't trust my ISP, Google or event cloudflare. I want to avoid censorship and relying on centralized services. And that's way more important for me than blocking ads.
    – Warrows
    Oct 9, 2018 at 14:27
  • I seem to have the same problem with my Samsung Galaxy A50. Have you tried disabling IPv6? Or have you found a solution already?
    – JHBonarius
    May 16, 2019 at 21:12

2 Answers 2

0

I have a similar if not the same problem - my S7 (Android 8.0.0) works fine with the exact same setup that you have until "the next morning": I have to disconnect and then reconnect to my WiFi in order to access the internet (or get proper DNS resolution?).

I could not yet find out the root cause (is the DNS changed/lost?), but I just installed a network analyzer (called "Ping & Net") in order to see if the DNS server on my phone is lost over night.

0

Enabling conditional forwarding for pi-hole (found in the DNS settings) temporarily fixed this for me.

1
  • Giving more detail about how similar your issue was and giving precise steps to solve it would be helpful for those who arrive here with this problem later. Feb 28, 2022 at 19:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .