netbird
netbird copied to clipboard
openwrt netbird service need to be modified to use netbird dns by using wireguard in userspace.
Describe the problem
openwrt netbird service need to be modified to use netbird dns by using wireguard in userspace.
When the netbird is running in kernel mode, the netbird dns cannot be accessed 100.124.255.254.
A clear and concise description of what the problem is.
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
ping: sendto: Required key not available
Expected behavior
nslookup openwrt-2.netbird.cloud
Server: 100.124.255.254
Address: 100.124.255.254:53
Non-authoritative answer:
Name: openwrt-2.netbird.cloud
Address: 100.124.74.200
Non-authoritative answer:
A clear and concise description of what you expected to happen.
Are you using NetBird Cloud?
Please specify whether you use NetBird Cloud or self-host NetBird's control plane.
NetBird version
netbird version
NetBird status -d output:
If applicable, add the `netbird status -d' command output.
Daemon version: 0.26.2
CLI version: 0.26.2
Management: Disconnected, reason: rpc error: code = DeadlineExceeded desc = context deadline exceeded
Signal: Connected
Relays: 2/2 Available
FQDN: openwrt.netbird.cloud
NetBird IP: 100.124.70.241/16
Interface type: Userspace
Quantum resistance: false
Peers count: 2/4 Connected
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
edit file /etc/init.d/netbird
#!/bin/sh /etc/rc.common
. /lib/netifd/netifd-proto.sh
START=99
STOP=10
USE_PROCD=1
service_triggers() {
procd_add_interface_trigger "interface.*" "wan" /etc/init.d/netbird restart
}
start_service() {
local device
export NB_WG_KERNEL_DISABLED=true
procd_open_instance
procd_set_param command /usr/bin/netbird
procd_append_param command service run
procd_set_param env NB_WG_KERNEL_DISABLED=true
procd_set_param pidfile /var/run/netbird.pid
procd_close_instance
}
https://github.com/netbirdio/netbird/issues/254
I've been using netbird, but not self hosting, for about 30 days on two devices, tplink_archer c7 v4 and totolink_x5000r, with wireguard kernelspace in openwrt snapshot without any problems so far, to be honest at sometimes tplink_archer c7 v4 disconnects, but I think the problem is the hardware, few resources, because totolink_x5000r is fine.
And I opened https://github.com/openwrt/packages/pull/23926 to add kmod-wireguard as a dependency for netbird, and to work in userspace you probably also need kmod-tun, maybe I add kmod-tun as dependency too? I just don't think it's good to change the default to use wireguard userspace
@masx200 is it still an issue for you with the latest NetBird versions?
@nazarewk, the 'issue' persists, but it is now a design decision, you can see my reasoning here https://github.com/openwrt/packages/pull/23926, and yeah, I believe this can be enhanced by documenting this behavior and integrating the env NB_WG_KERNEL_DISABLED with uci, and the user can install kmod-tun and use wireguard in userspace if they choose to. That's what I think.