netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
10.78k stars 486 forks source link

[Android] DNS resolution error on WiFi #1833

Open Ziomal12 opened 5 months ago

Ziomal12 commented 5 months ago

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.

pappz commented 5 months ago

Hi @Ziomal12!

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

Ziomal12 commented 5 months ago

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

dbergloev commented 5 months ago

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

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 commented 5 months ago

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
smartlot commented 5 months ago

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?

OminousLama commented 1 month ago

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. :(

badmark commented 1 month ago

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.