netbird icon indicating copy to clipboard operation
netbird copied to clipboard

Netbird DNS not working on android

Open simen64 opened this issue 1 year ago • 2 comments

Describe the problem

When using the netbird VPN on my pixel 8 pro, it does not resolve dns using the netbird assigned DNS server.

To Reproduce

Steps to reproduce the behavior:

  1. Use the netbird vpn on pixel 8 pro
  2. Make sure private DNS is turned off in settings
  3. try to access one of the netbird IP's in the browser
  4. See nothing

Expected behavior The IP resolves and serves what is on that clients ip web ui etc

Are you using NetBird Cloud?

I am self-hosting

NetBird version

Server version = 0.28.7 Android app version = `0.28.0

I have attached the logs from advanced trace log from the netbird app. netbird-1723394378631.log.txt

simen64 avatar Aug 13 '24 12:08 simen64

@simen64 any chance it's related to 1483 ? Adding a DNS server solved similar issues that I was having.

cannonfodda avatar Sep 10 '24 16:09 cannonfodda

Seems like I have the same issue. I have adguard as dns and it works on windows and Linux but not on my 1+11-Android14

I have a nameserver setup for distribution group "all". This works on my windows machine.

I can ping the ip of the other peers but an nslookup on the domain name fails and shows the phone using 8.8.8.8 instead of the nameserver set in Netbird.

EDIT: Just adding some more context after updating peers to 0.30.2

Peers: billede

Nameserver: billede

netbird status -d shows nameserver on all devices, but names only resolve properly on windows.

jakob1379 avatar Oct 17 '24 15:10 jakob1379

I believe this is a result of issue 2158

simen64 avatar Oct 27 '24 19:10 simen64

Same behavior on Linux and Windows with 0.34.1 (Linux) and 0.35.1 (Windows). Nameserver is filtered with Distribution Groups. Configuring the same DNS without Distribution Groups works as a workaround.

OS: linux/amd64
Daemon version: 0.34.1
CLI version: 0.34.1
Management: Connected to https://api.netbird.io:443
Signal: Connected to https://signal.netbird.io:443
Relays: 
  [stun:stun.netbird.io:5555] is Available
  [turns:turn.netbird.io:443?transport=tcp] is Available
  [rels://streamline-de-fra1-1.relay.netbird.io:443] is Available
Nameservers: 
  [pri.va.te.ip:53] for [demo.loc, demo.it] is Available
  [pri.va.te.ip:53] for [demo2.loc] is Available
FQDN: <redacted>.netbird.cloud
NetBird IP: 100.126.158.114/16
Interface type: Kernel
Quantum resistance: false
Routes: -
Peers count: 2/2 Connected

areYouLazy avatar Dec 29 '24 10:12 areYouLazy

I can confirm this issue still exists with the official Android client 0.0.27 from the Google Store but Jetbird behaves the same. I have tested it between 3 hosts (docker server, linux end device, android mobile device) with the defaul ACL but only Android devices being unable to resolve hostnames.

codeInTheShell avatar Jun 27 '25 10:06 codeInTheShell

@codeInTheShell are you talking about Nameservers or Resources/Routes on the NetBird side?

the later might not be implemented on Android yet https://github.com/netbirdio/netbird/pull/3989

nazarewk avatar Jun 27 '25 12:06 nazarewk

@codeInTheShell are you talking about Nameservers or Resources/Routes on the NetBird side?

the later might not be implemented on Android yet #3989

Sorry for not being clear on that, i meant resources/routes on the NetBird side. Thanks for the link

codeInTheShell avatar Jun 27 '25 12:06 codeInTheShell

Works for me running the beta 0.1.2

jakob1379 avatar Jun 27 '25 15:06 jakob1379

I m also having the issue of peer domain name resolution not working on my android 15 device, using v 1.11

Hanibachi avatar Oct 12 '25 21:10 Hanibachi

me, too - adding additional "default" dns servers fixed the issue for me.

hvolpers avatar Oct 15 '25 21:10 hvolpers

me, too - adding additional "default" dns servers fixed the issue for me.

Can you please elaborate? I'm having the same issue

fonzdm avatar Oct 27 '25 17:10 fonzdm

@fonzdm Login to Netbird console with administrative rights, go to dns -> nameservers and select a public one, e.g. cloudflare, assign it to all (or a specific group) without defining a domain in addition to your internal nameserver where you define the domains it should be used for. Another solution should be (didn't test it) to remove the domains from your internal nameserver definition. I think the device will only use netbird for name resolution. If you only have an internal nameserver defined for internal domains the device is no longer able to lookup a name for other domain than your internal ones. Adding a "default" nameserver for all other domains fixes this issue.

hth

hvolpers avatar Nov 18 '25 10:11 hvolpers