Description
Describe the problem
We have multiple network routes with a nameserver entry to the same domain in each . If we select only one network route, netbird should use the nameerver from that network because it is the only one reachable from the peer.
It seems that netbird use the first available nameserver for the requested domain even if this is not available from the peer.
To Reproduce
Steps to reproduce the behavior:
-
Create two or more peers in different networks and create network routes to this networks.
e.g.:
peer1 with local IP 172.20.0.1 with network route 172.20.0.0/16 with name lan1
peer2 with local IP 172.21.0.1 with network route 172.21.0.0/16 with name lan2
peer3 with local IP 172.22.0.1 with network route 172.22.0.0/16 with name lan3 -
Install DNS server which can resolve test.testdomain.com in each network and create a nameserver entry in netbord for the same domain in each network.
e.g.:
entry 1 with nameserver 172.20.0.253 with the domain testdomain.com
entry 2 with nameserver 172.21.0.253 with the domain testdomain.com
entry 3 with nameserver 172.22.0.253 with the domain testdomain.com -
On the client select only one network after another and try to resolve test.testdomain.com.
Only in one network there is a correct result. In the other networks you will get an error that the name can't resolve.
Expected behavior
netbird should use the nameserver reachable by the peer.
Are you using NetBird Cloud?
no, self-hosted
NetBird version
server 0.29.3
client 0.29.4
NetBird status -dA output:
Peers detail:
lan1-pve1.netbird.selfhosted:
NetBird IP: 100.97.19.116
Public key: ...
Status: Connected
-- detail --
Connection type: Relayed
ICE candidate (Local/Remote): -/-
ICE candidate endpoints (Local/Remote): -/-
Relay server address: rels://netbird.anon-RZnkf.domain:443
Last connection update: 9 seconds ago
Last WireGuard handshake: 8 seconds ago
Transfer status (received/sent) 3.5 KiB/12.3 KiB
Quantum resistance: false
Routes: -
Latency: 0s
lan2-pve1.netbird.selfhosted:
NetBird IP: 100.97.131.97
Public key: ...
Status: Connected
-- detail --
Connection type: Relayed
ICE candidate (Local/Remote): -/-
ICE candidate endpoints (Local/Remote): -/-
Relay server address: rels://netbird.anon-RZnkf.domain:443
Last connection update: 4 minutes, 50 seconds ago
Last WireGuard handshake: 6 minutes, 12 seconds ago
Transfer status (received/sent) 92 B/6.3 KiB
Quantum resistance: false
Routes: -
Latency: 37.261ms
lan3-pve1.netbird.selfhosted:
NetBird IP: 100.97.140.40
Public key: ...
Status: Connected
-- detail --
Connection type: P2P
ICE candidate (Local/Remote): srflx/srflx
ICE candidate endpoints (Local/Remote): 198.51.100.0:51820/198.51.100.1:51820
Relay server address: rels://netbird.anon-RZnkf.domain:443
Last connection update: 42 minutes, 15 seconds ago
Last WireGuard handshake: 1 minute, 15 seconds ago
Transfer status (received/sent) 4.4 KiB/12.9 KiB
Quantum resistance: false
Routes: -
Latency: 146.6974ms
OS: windows/amd64
Daemon version: 0.29.4
CLI version: 0.29.4
Management: Connected to https://netbird.anon-RZnkf.domain:443
Signal: Connected to https://netbird.anon-RZnkf.domain:443
Relays:
[stun:netbird.anon-RZnkf.domain:3478] is Available
[turn:netbird.anon-RZnkf.domain:3478?transport=udp] is Available
[rels://netbird.anon-RZnkf.domain:443] is Available
Nameservers:
[172.20.0.253:53] for [anon-STYq8.domain] is Available
[172.21.0.253:53] for [anon-STYq8.domain] is Available
[172.22.0.253:53] for [anon-STYq8.domain] is Available
FQDN: peer9.netbird.selfhosted
NetBird IP: 100.97.207.78/16
Interface type: Userspace
Quantum resistance: false
Routes: -
Peers count: 3/3 Connected
Do you face any (non-mobile) client issues?
Screenshots
Additional context