DNS Routes Not Functioning Properly in NetBird #1007

Closed
opened 2025-11-20 05:21:39 -05:00 by saavagebueno · 4 comments
Owner

Originally created by @roney492 on GitHub (Jun 21, 2024).

Describe the problem

The new DNS routes feature in NetBird is not working as expected. Sites that are supposed to be routed through specified Network routes either timeout in browser or as routed directly ie via original IP instead of the expected peer.

This was tested using "whatsmyip.com" with a routing peer on windows machines.

To Reproduce

Steps to reproduce the behaviour:

  1. Configure DNS routes in NetBird for domains such as "whatismyipaddress.com" and "www.whatismyip.com".
  2. Set it to route though a routing peer.
  3. Open a browser (e.g., Chrome) and navigate to "whatismyipaddress.com" or "www.whatismyip.com".
  4. Observe that the browser either times out or displays the original IP on "whatsmyip.com".

Expected behavior
Traffic to specified domains (e.g.,"whatismyipaddress.com" or "www.whatismyip.com") should be routed through the designated peer, resulting in the correct routed IP.

Are you using NetBird Cloud?
No, Self hosted.

NetBird version
0.28.2

Additional Info
This works well with IP routing, only with DNS routing its failing.

Originally created by @roney492 on GitHub (Jun 21, 2024). **Describe the problem** The new DNS routes feature in NetBird is not working as expected. Sites that are supposed to be routed through specified Network routes either timeout in browser or as routed directly ie via original IP instead of the expected peer. This was tested using "whatsmyip.com" with a routing peer on windows machines. **To Reproduce** Steps to reproduce the behaviour: 1. Configure DNS routes in NetBird for domains such as "whatismyipaddress.com" and "www.whatismyip.com". 2. Set it to route though a routing peer. 3. Open a browser (e.g., Chrome) and navigate to "whatismyipaddress.com" or "www.whatismyip.com". 4. Observe that the browser either times out or displays the original IP on "whatsmyip.com". **Expected behavior** Traffic to specified domains (e.g.,"whatismyipaddress.com" or "www.whatismyip.com") should be routed through the designated peer, resulting in the correct routed IP. **Are you using NetBird Cloud?** No, Self hosted. **NetBird version** 0.28.2 **Additional Info** This works well with IP routing, only with DNS routing its failing.
saavagebueno added the clientroutes labels 2025-11-20 05:21:39 -05:00
Author
Owner

@lixmal commented on GitHub (Jun 21, 2024):

Hi @roney492,

can you provide a netbird status -d and netbird routes ls please?

Please consider that www.whatismyip.com and whatismyip.com are separate domains and might need to be added both, especially if one redirects to another. Also whatsmyip.com (missing an i) is different. Which one have you tested?

The browser might query different (sub)domains in the background that are not visible. E.g. whatismyip.com also queries api.whatismyip.com

@lixmal commented on GitHub (Jun 21, 2024): Hi @roney492, can you provide a `netbird status -d` and `netbird routes ls` please? Please consider that `www.whatismyip.com` and `whatismyip.com` are separate domains and might need to be added both, especially if one redirects to another. Also `whatsmyip.com` (missing an `i`) is different. Which one have you tested? The browser might query different (sub)domains in the background that are not visible. E.g. `whatismyip.com` also queries `api.whatismyip.com`
Author
Owner

@roney492 commented on GitHub (Jun 21, 2024):

sure,
`
C:\Users\Roney>netbird status -d
Peers detail:
cxxxxxxxx.netbird.selfhosted:
NetBird IP: 100.123.171.xxx/32
Public key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Status: Disconnected
-- detail --
Connection type: Relayed
Direct: false
ICE candidate (Local/Remote): host/relay
ICE candidate endpoints (Local/Remote): 172.17.xx.x:51820/142.xx.xxx.xxx:51352
Last connection update: 13 seconds ago
Last WireGuard handshake: 51 seconds ago
Transfer status (received/sent) 7.6 KiB/10.0 KiB
Quantum resistance: false
Routes: -
Latency: 0s

cxxxx-01.netbird.selfhosted:
NetBird IP: 100.123.155.xxx/32
Public key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Status: Disconnected
-- detail --
Connection type: Relayed
Direct: false
ICE candidate (Local/Remote): host/relay
ICE candidate endpoints (Local/Remote): 172.17.xx.x:51820/142.xx.xxx.xxx:51352
Last connection update: 13 seconds ago
Last WireGuard handshake: 51 seconds ago
Transfer status (received/sent) 7.6 KiB/10.0 KiB
Quantum resistance: false
Routes: -
Latency: 0s

monster.netbird.selfhosted:
NetBird IP: 100.123.14.xxx
Public key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Status: Connected
-- detail --
Connection type: Relayed
Direct: true
ICE candidate (Local/Remote): host/relay
ICE candidate endpoints (Local/Remote): 172.17.xx.x:51820/142.xx.xxx.xxx:59242
Last connection update: 9 minutes, 39 seconds ago
Last WireGuard handshake: 1 minute, 18 seconds ago
Transfer status (received/sent) 4.7 KiB/6.6 KiB
Quantum resistance: false
Routes: 192.168.17.1/32, whatismyipaddress.com, www.whatismyip.com, api.whatismyip.com, whatismyip.com
Latency: 69.2636ms

cxxx.netbird.selfhosted:
NetBird IP: 100.123.224.11x
Public key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Status: Disconnected
-- detail --
Connection type: Relayed
Direct: false
ICE candidate (Local/Remote): host/relay
ICE candidate endpoints (Local/Remote): 172.17.xx.x:51820/142.xx.xxx.xxx:51352
Last connection update: -
Last WireGuard handshake: 51 seconds ago
Transfer status (received/sent) 7.6 KiB/10.0 KiB
Quantum resistance: false
Routes: -
Latency: 0s

OS: windows/amd64
Daemon version: 0.28.2
CLI version: 0.28.2
Management: Connected to https://mnxxx.cxxxx.io:33073
Signal: Connected to http://mnxxx.cxxxx.io:10000
Relays:
[stun:mnxxx.cxxxx.io:3478] is Available
[turn:mnxxx.cxxxx.io:3478?transport=udp] is Available
Nameservers:
FQDN: laptop-roney.netbird.selfhosted
NetBird IP: 100.123.106.xxx/16
Interface type: Userspace
Quantum resistance: false
Routes: -
Peers count: 2/5 Connected
`

image

image

tried the suggestion aswell, facing same issue though, tried same using other routing (linux) peers also, same issue.

@roney492 commented on GitHub (Jun 21, 2024): sure, ` C:\Users\Roney>netbird status -d Peers detail: cxxxxxxxx.netbird.selfhosted: NetBird IP: 100.123.171.xxx/32 Public key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Status: Disconnected -- detail -- Connection type: Relayed Direct: false ICE candidate (Local/Remote): host/relay ICE candidate endpoints (Local/Remote): 172.17.xx.x:51820/142.xx.xxx.xxx:51352 Last connection update: 13 seconds ago Last WireGuard handshake: 51 seconds ago Transfer status (received/sent) 7.6 KiB/10.0 KiB Quantum resistance: false Routes: - Latency: 0s cxxxx-01.netbird.selfhosted: NetBird IP: 100.123.155.xxx/32 Public key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Status: Disconnected -- detail -- Connection type: Relayed Direct: false ICE candidate (Local/Remote): host/relay ICE candidate endpoints (Local/Remote): 172.17.xx.x:51820/142.xx.xxx.xxx:51352 Last connection update: 13 seconds ago Last WireGuard handshake: 51 seconds ago Transfer status (received/sent) 7.6 KiB/10.0 KiB Quantum resistance: false Routes: - Latency: 0s monster.netbird.selfhosted: NetBird IP: 100.123.14.xxx Public key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Status: Connected -- detail -- Connection type: Relayed Direct: true ICE candidate (Local/Remote): host/relay ICE candidate endpoints (Local/Remote): 172.17.xx.x:51820/142.xx.xxx.xxx:59242 Last connection update: 9 minutes, 39 seconds ago Last WireGuard handshake: 1 minute, 18 seconds ago Transfer status (received/sent) 4.7 KiB/6.6 KiB Quantum resistance: false Routes: 192.168.17.1/32, whatismyipaddress.com, www.whatismyip.com, api.whatismyip.com, whatismyip.com Latency: 69.2636ms cxxx.netbird.selfhosted: NetBird IP: 100.123.224.11x Public key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Status: Disconnected -- detail -- Connection type: Relayed Direct: false ICE candidate (Local/Remote): host/relay ICE candidate endpoints (Local/Remote): 172.17.xx.x:51820/142.xx.xxx.xxx:51352 Last connection update: - Last WireGuard handshake: 51 seconds ago Transfer status (received/sent) 7.6 KiB/10.0 KiB Quantum resistance: false Routes: - Latency: 0s OS: windows/amd64 Daemon version: 0.28.2 CLI version: 0.28.2 Management: Connected to https://mnxxx.cxxxx.io:33073 Signal: Connected to http://mnxxx.cxxxx.io:10000 Relays: [stun:mnxxx.cxxxx.io:3478] is Available [turn:mnxxx.cxxxx.io:3478?transport=udp] is Available Nameservers: FQDN: laptop-roney.netbird.selfhosted NetBird IP: 100.123.106.xxx/16 Interface type: Userspace Quantum resistance: false Routes: - Peers count: 2/5 Connected ` ![image](https://github.com/netbirdio/netbird/assets/116948023/ec95f28b-1921-4b22-bed2-5921ae4d9915) ![image](https://github.com/netbirdio/netbird/assets/116948023/46b57014-d912-41c9-8535-8dc4c12759f5) tried the suggestion aswell, facing same issue though, tried same using other routing (linux) peers also, same issue.
Author
Owner

@lixmal commented on GitHub (Jun 21, 2024):

Have you updated the routing peer to >=0.28.0 as well?

@lixmal commented on GitHub (Jun 21, 2024): Have you updated the routing peer to >=0.28.0 as well?
Author
Owner

@roney492 commented on GitHub (Jun 21, 2024):

Have you updated the routing peer to >=0.28.0 as well?

no, missed that part, routing peer wasn't updated, After update it started working as expected now.
Thanks a lot @lixmal :)

@roney492 commented on GitHub (Jun 21, 2024): > Have you updated the routing peer to >=0.28.0 as well? no, missed that part, routing peer wasn't updated, After update it started working as expected now. Thanks a lot @lixmal :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1007