Skip to content

Unable to resolve dns on Android 13 #8006

Closed

Description

@maple3142

What is the issue?

Unable to resolve any domain without specifying dns server explicitly when tailscale is enabled. Private DNS is not enabled either.

Steps to reproduce

  1. Enable Tailscale
  2. Open Termux
  3. ping google.com: failed
  4. ping 8.8.8.8: works
  5. dig google.com @8.8.8.8: works
  6. Open YouTube app: failed to show anything

Are there any recent changes that introduced the issue?

No response

OS

Android

OS version

Android 13

Tailscale version

1.40.0-t9bdaece3d-ge0ba590be3e

Other software

AdGuard Android (will be automatically disabled when Tailscale is active)

Bug report

BUG-4cc3d4f3fd6b5ea50b2982505d0d6ffaae31e1bb5fcb6181ab4f17b70bd5c599-20230429112917Z-441b5f2258c699b5

Activity

  1. Akeboshiwind commented on Apr 29, 2023

    @Akeboshiwind

    I've got the same issue I think.
    I've only reproduced it by navigating in Firefox though.
    I'm on Tailscale version 1.38.2.

    When I disable MagicDNS I'm able to navigate to new URLs again.

  2. maple3142 commented on Apr 29, 2023

    @maple3142
    Author

    I found some new info:

    If I switched to wifi before enabling Tailscale, DNS works.

    If I use mobile data before enabling Tailscale, DNS is broken.

  3. DentonGentry commented on Apr 29, 2023

    @DentonGentry
    Contributor

    If I use mobile data before enabling Tailscale, DNS is broken.

    Could you generate a Bugreport when using mobile data and enabling Tailscale, when DNS is broken? Ideally, generate the bugreport immediately after enabling Tailscale. That gives us a specific point in the telemetry to look at.

  4. maple3142 commented on Apr 30, 2023

    @maple3142
    Author

    If I use mobile data before enabling Tailscale, DNS is broken.

    Could you generate a Bugreport when using mobile data and enabling Tailscale, when DNS is broken? Ideally, generate the bugreport immediately after enabling Tailscale. That gives us a specific point in the telemetry to look at.

    BUG-4cc3d4f3fd6b5ea50b2982505d0d6ffaae31e1bb5fcb6181ab4f17b70bd5c599-20230430005046Z-3913f775a9b2e20c
    
  5. DentonGentry commented on Apr 30, 2023

    @DentonGentry
    Contributor

    The tailnet in its https://login.tailscale.com/admin/dns has "Override local DNS" turned off, which means Tailscale is supposed to find the DNS servers which were already present in the underlying OS and use those.

    Android makes this difficult: starting in Android 8, apps are not allowed to retrieve the DNS server properties like net.dns1 or net.dns4. We instead implement a series of mechanisms in https://github.com/tailscale/tailscale-android/blob/main/android/src/main/java/com/tailscale/ipn/DnsConfig.java

    Shortly before the bugreport while on mobile data, all of those mechanisms fail to find a DNS server:

    2023-04-30 00:49:24.449414758 +0000 UTC: getDnsConfigFromLinkProperties:
    2023-04-30 00:49:24.45033053 +0000 UTC: getDnsServersFromSystemProperties:
    2023-04-30 00:49:24.4510717 +0000 UTC: getDnsServersFromNetworkInfo:
    

    Earlier, on Wi-fi, it did find the DNS servers in use:

    2023-04-29 16:43:19.169134333 +0000 UTC: getDnsConfigFromLinkProperties: 192.168.x.1
    2023-04-29 16:43:19.169683731 +0000 UTC: getDnsServersFromSystemProperties:
    2023-04-29 16:43:19.171425349 +0000 UTC: getDnsServersFromNetworkInfo: 192.168.x.1
    

    One way to work around the issue would be to set "Override local DNS" in https://login.tailscale.com/admin/dns

  6. added
    OS-android
    L2 Few
    P3 Can't get started
    T5 Usability
    and removed on Apr 30, 2023
  7. maple3142 commented on May 1, 2023

    @maple3142
    Author

    Thanks for replying!

    One way to work around the issue would be to set "Override local DNS" in login.tailscale.com/admin/dns

    Enabling "Override local DNS" does fix the DNS issue for my Android device, but it would also override the DNS setting for other devices. Is it possible to enable this setting for one specific device instead of a whole tailnet?

  8. deleted a comment from hkpanchani on May 3, 2023
  9. 8 remaining items

  10. LinAGKar commented on Jul 15, 2023

    @LinAGKar

    That won't help with connecting to things on the internet

  11. elektrinis commented on Sep 26, 2023

    @elektrinis

    Is there a fix for this? I don't have deep knowledge what's going on, but anyway, when I disconnect from wifi, my internet (websites etc) no longer works.
    I have a similar problem on my windows machine - connections are very slow, as it looks like it is forcing some usual traffic through the tunnel.

  12. mishley commented on Nov 10, 2023

    @mishley

    I have this same issue, have to stop and restart Tailscale to resolve. The issue seems to only happen occasionally when moving between networks, but not always. Most commonly I notice it when I've left my home wifi and then attempt to connect to the Internet from mobile networks like LTE.

  13. lxdlam commented on Dec 23, 2023

    @lxdlam

    Since the issue is related with the DNS, I've disabled the MagicDNS as a temporary workaround, then it seems the tailscale will recover from any situation(Wifi -> cellular regardless whether I keep the connection or not).

  14. versita commented on Dec 29, 2023

    @versita

    I've been using Tailscale on Android for a couple of weeks now and didn't encounter this problem until I switched to a different wireless carrier. With my previous carrier, I left Tailscale connected 24/7 without issue but after switching to another carrier a few days ago, the DNS will not resolve domain names even with Private DNS set to off or automatic whilst using my cellular connection.

    Disabling MagicDNS or enabling the local DNS override both solve the issue for me. For me, it makes the most sense to disable MagicDNS, and in this configuration I can still use a Private DNS on Android without issue.

  15. fd0 commented on Feb 2, 2024

    @fd0

    I think I've got the same issue (Pixel 7a, Android 14), always reproducible: switching from wifi in my home network to cellular breaks resolving hostnames with MagicDNS enabled. Toggling Tailscale or briefly switching to Flight Mode resolves it. Very annoying.

    I've made a bugreport directly after DNS broke: BUG-0a78adbf819fc5a54b46874b03ec6d7ea87b01c55ec2bcde7cf753dd3c3f8b32-20240202191158Z-68b850446d0a04cf

    Does that help? Is there anything else I can do?

  16. kansson commented on Mar 24, 2024

    @kansson

    Same problem but switching from GitHub to Google account worked.

  17. 46319943 commented on Mar 29, 2024

    @46319943

    When using my tab of Android 13 with only the WIFI network, the DNS cannot be resolved, while directly using the IP is fine.
    After disabling the MagicDNS, the DNS issue is resolved.

    It's weird that there is no problem on my phone, which is based on Android 12.

  18. agottardo commented on Apr 25, 2024

    @agottardo
    Contributor

    @maple3142 @46319943 @hanssonduck @fd0 Does this issue still occur on the latest beta version of the Android app?

    Please attach a bug report identifier if so, we cannot identify the root cause without one.

  19. NimecShady commented on Apr 26, 2024

    @NimecShady

    @maple3142 @46319943 @hanssonduck @fd0 Does this issue still occur on the latest beta version of the Android app?

    Please attach a bug report identifier if so, we cannot identify the root cause without one.

    I have been experiencing the internet drop after switching from Wifi to Cellular as well. Will give the beta app a try tomorrow and see how it does.

  20. maple3142 commented on Apr 26, 2024

    @maple3142
    Author

    @maple3142 @46319943 @hanssonduck @fd0 Does this issue still occur on the latest beta version of the Android app?

    Please attach a bug report identifier if so, we cannot identify the root cause without one.

    I am testing it on latest stable version using Cellular network with Override local DNS turned off, and it currently works.

  21. lxdlam commented on Apr 26, 2024

    @lxdlam

    @maple3142 @46319943 @hanssonduck @fd0 Does this issue still occur on the latest beta version of the Android app?

    Please attach a bug report identifier if so, we cannot identify the root cause without one.

    It works as expected now, even after I re-enabled MagicDNS.

  22. agottardo commented on Apr 26, 2024

    @agottardo
    Contributor

    Thanks for the feedback. Please keep opening issues for any other problem with the beta app, it's much appreciated! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    L2 FewOS-androidP3 Can't get startedT5 Usabilitybug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions