netbird icon indicating copy to clipboard operation
netbird copied to clipboard

[Android] DNS resolution error on WiFi

Open Ziomal12 opened this issue 10 months ago • 7 comments

Describe the problem

DNS error with Netbird enabled on wifi. On cellular data everything works just fine. The problem is most apparent with internet browsers but affects other apps too.

To Reproduce

Steps to reproduce the behavior:

  1. Connect to Wifi network
  2. Enable Netbird
  3. Go to internet browser
  4. Enter any page that hasn't been visited lately (to make sure it doesn't have DNS cached.
  5. Connection times out.

Expected behavior

Webpage should load.

Are you using NetBird Cloud?

I'm using self-hosted control plane.

NetBird version

Android app version 0.0.20 (agent version 0.25.6) - latest available from Google Play Store at the time. Control plane version (0.27.2)

Additional context

Android_logs_on_mobile_data.txt android_logs_on_wifi.txt

I have Quad9 DNS nameserver added and enabled in control plane.

On both Wifi and mobile data I'm able to ping ip addresses (i.e 1.1.1.1) but on Wifi I cannot ping domains (i.e. github.com), on Mobile data pinging domains works. (those tests done using Termux) No routes configured, no posture checks, no policies.

Ziomal12 avatar Apr 11 '24 12:04 Ziomal12

Hi @Ziomal12!

Could you share with me the version number of the Android OS?

pappz avatar Apr 11 '24 12:04 pappz

Of course, sorry for not including that. It's Android 14.

Ziomal12 avatar Apr 11 '24 12:04 Ziomal12

I have similar issues with Android 13. Does not mater if it's on WiFi or not, DNS is not working.

  • On WiFi the DNS is not changed at all. It remains whatever the Router provided.
  • On Celular the DNS is changed to some 100.* address, but it does not resolve any custom domains that I have on my own DNS server, so it's propbaly just using some Netbird assigned DNS since normal domains are resolved.

On Linux the configuration is working as expected and so does Android with both ZeroTier and my own Wireguard setup. But Android+Netbird cannot do custom DNS.

dbergloev avatar Apr 11 '24 21:04 dbergloev

Well on celular it uses 100.97.255.254. I tried using this in a docker container running Netbird and through netshoot on top of it and I am getting strange results.

$ host -t A google.com 100.97.255.254
netmgr/uverr2result.c:98:isc___nm_uverr2result(): unable to convert libuv error code in udp_send_cb (netmgr/udp.c:804) to isc_result: -126: Unknown system error -126

It is working with other servers

$ host -t A google.com 1.1.1.1
Using domain server:
Name: 1.1.1.1
Address: 1.1.1.1#53
Aliases: 

google.com has address 142.250.147.101
google.com has address 142.250.147.138
google.com has address 142.250.147.139
google.com has address 142.250.147.102
google.com has address 142.250.147.113
google.com has address 142.250.147.100

dbergloev avatar Apr 11 '24 21:04 dbergloev

I have everything setup and clients connecting, but for the life of me, regardless of what I try, I cannot get clients to use my internal DNS servers, it just does not resolve anything! Without DNS server entries it just defaults to Google.

How do I force clients to only use my LAN DNS servers?

smartlot avatar Apr 15 '24 00:04 smartlot

I also have this issue. I think it worked a while back (not sure, might have been chached and given a false positive), but doesnt anymore. :(

OminousLama avatar Aug 16 '24 18:08 OminousLama

Wasted hours of my life trying to get Netbird to "work". It's billed as an easier way to setup Wireguard, LIES!

Took me less than 25 minutes to setup server and 5 clients, over the days spent trying to get this to work.

Save your time, Wireguard is simple enough, Netbird will only give you headaches.

I mean, 601 open issues? Just shut down the project, it's a waste.

badmark avatar Aug 16 '24 20:08 badmark