celzero / rethink-app

DNS over HTTPS / DNS over Tor / DNSCrypt client, WireGuard proxifier, firewall, and connection tracker for Android.
https://rethinkfirewall.com/
Apache License 2.0
2.61k stars 132 forks source link

"No internet" after restart and system dns #1503

Open GambaJo opened 3 weeks ago

GambaJo commented 3 weeks ago

I use RethinkDNS on 2 Samsung devices and I have the same problem on both devices. I choose the option "System DNS". When I restart my devices RethinkDNS show me the status "no internet".

My workaround is, that after a restart I choose the "Rethink DNS" option, then I hit the refresh button (in the upper right corner of the DNS section). Then I choose the "System DNS" option and hit the refresh button again. After this, I have internet access.

It seems to me, like RethinkDNS has problems with System DNS.

grafik

ignoramous commented 3 weeks ago

There were problems with System DNS in v055c up until v055e. Can you check About UI in Rethink and scroll to the bottom and tell us which version it shows you?

GambaJo commented 3 weeks ago

There were problems with System DNS in v055c up until v055e. Can you check About UI in Rethink and scroll to the bottom and tell us which version it shows you?

vv0.5.5m (fdroid)

Kamika242 commented 2 weeks ago

I have this problem on 3 different devices today with 3 different versions of Rethink, v055a, v055j and v055m (all F-Droid), home and mobile network. First I thought there is a failure of my internet connection, but here on my Linux laptop everything is fine, directly connected to the Fritzbox with Adguard DNS servers set as default there. I also tried to switch to system DNS and back to RDNS+ in Rethink on the 3 devices, no solution. Is it possible that the provider (Vodafone) blocks Rethink now?

Edit: Now, 3 hours later, the connection is back on all 3 devices. Absolutely don't know, what the problem was.

ignoramous commented 1 week ago

3 hours later, the connection is back on all 3 devices. Absolutely don't know, what the problem was.

Usually DNS Logss should show errors when something like this happens. Each entry also shows which upstream resolver was used and whether it worked or not.

ignoramous commented 1 week ago

Then I choose the "System DNS" option and hit the refresh button again. After this, I have internet access.

It seems to me, like RethinkDNS has problems with System DNS.

@GambaJo sorry, I'm confused. If System DNS works after you switch to it, how is it a problem with System DNS? You mean Rethink DNS has problems?

GambaJo commented 1 week ago

If System DNS works after you switch to it, how is it a problem with System DNS? You mean Rethink DNS has problems?

Yes. Only WiFi is on, Mobile internet connection is off. I choose the option "System DNS" in Rethink DNS and restart my phone. After it started, Rethink DNS shows me "no internet".

grafik

So I tried another dns option (Rethink DNS) in the Rethink DNS app. Then I have internet connection. When I switch back to the option "System DNS", I have still internet connection.

grafik

BUT: When I restart my phone (or turn WiFi off an on again), Rethink DNS shows me "no internet" (see first image)

So everytime I restart my phone or turn my wifi off and on, I have to go into the dns setting of Rethink DNS, choose the Rethink DNS option, refresh, then choose the System DNS option and refresh again. Or disable the Rethink DNS app. Otherwise after every restart Rehink DNS cuts my internet connection.

ignoramous commented 1 week ago

When you hit this "no internet" issue, what do you see in DNS Log? Tap on any of the failing queries and look at the footer of the bottomsheet that comes up to see if it shows any error msg.

If not, if you're technical enough, set Rethink in Very verbose mode (from Configure -> Settings -> Log level) and capture adb logcat at the time this issue (when you switch off wifi and turn it back in again but it keeps showing "no internet" and never auto-recovers from it) happens and email it to us (mz at celzero dot com)?

In the meanwhile, I'll also try to reproduce this issue on v055n. Have I got the steps right?

  1. Use System DNS.
  2. Put Android on airplane mode.
  3. Restart.
  4. Connect to WiFi
  5. Notice there is "no internet" and Rethink does not auto-recover unless Rethink is STOP/START again or refresh icon is tapped.
GambaJo commented 1 week ago

5. Notice there is "no internet" and Rethink does not auto-recover unless Rethink is STOP/START again or refresh icon is tapped.

Refresh is not enough. I have to choose an other dns server (like Rethink DNS) first, refresh, and then go back to System DNS and refresh.

I send you the logs via mail.

I noticed something strange:

I found this blocked entry img0: ![grafik](https://github.com/celzero/rethink-app/assets/1378907/c265454f-d5ce-437e-b11d-0290bdc1653e)
But this app is bypassed img1: ![grafik](https://github.com/celzero/rethink-app/assets/1378907/85337d45-a462-40af-ad17-db24c56f8f76)
This is a web site I tried to open img2: ![grafik](https://github.com/celzero/rethink-app/assets/1378907/f450ac23-50d9-421f-98a8-e91a1da0ac3a)
ignoramous commented 1 week ago

From when System DNS starts working after you switch over to another DNS and/or "refresh", can you post a screenshot, please. I am interested in the IP address of the resolver (which in the screenshot that you shared above is system.[2a02:8071:59c1:...:5ea]:53, the IP that did not work).

Thanks for the logs, I'll take a look and get back.

I noticed something strange: I found this blocked entry

We need to not show it as "Error". We'll fix the label. Please see: #1554

GambaJo commented 1 week ago

I am interested in the IP address of the resolver (which in the screenshot that you shared above is system.

Where can I find this?

I made a crappy video: https://youtu.be/3M4TZyeZ2EI It starts with a reboot of my phone (I have to cover it short, because of my PIN). Then I open Rethink DNS. You can see, System DNS is set and there is no internet. Then I choose another DNS Server, refresh, and choose System DNS and refresh -> I have internet connection (can open a website). Then I restart my phone, try to open the same website, but it only shows the ofline version. Then I open Rethink DNS -> no internet. And I can restart the whole process (another dna, system dns, ...)

ignoramous commented 1 week ago

The issue is, the network (FritzBox?) reports both IPv6 and IPv4 DNS endpoints, but never responds over IPv6. Unexpectedly, the network reports as being single-stack and having just the IPv4 routes.

There were a couple issues why Rethink did not auto-recover:

(also see linked commits)

I am interested in the IP address of the resolver (which in the screenshot that you shared above is system.

Where can I find this?

In the bottomsheet in DNS Logs, just below where it shows IP address / "SEND_FAIL" and the like.