[GH-ISSUE #3382] Netbird on OpenWRT #6885

Open
opened 2026-08-05 01:10:34 -04:00 by saavagebueno · 18 comments
Owner

Originally created by @Abnersouza7 on GitHub (Feb 24, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/3382

Originally assigned to: @nazarewk on GitHub.

Is your feature request related to a problem? Please describe.
I need to monitor the functionality of a router using openWRT, I use your services for other part of my project and really want to use it under the router too

Describe the solution you'd like
Make it work on OpenWRT

Describe alternatives you've considered
I know Tailscale works with that, but we already have everything setup with Netbird

Originally created by @Abnersouza7 on GitHub (Feb 24, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/3382 Originally assigned to: @nazarewk on GitHub. **Is your feature request related to a problem? Please describe.** I need to monitor the functionality of a router using openWRT, I use your services for other part of my project and really want to use it under the router too **Describe the solution you'd like** Make it work on OpenWRT **Describe alternatives you've considered** I know Tailscale works with that, but we already have everything setup with Netbird
saavagebueno added the feature-requestopenwrt labels 2026-08-05 01:10:34 -04:00
Author
Owner

@wehagy commented on GitHub (Feb 24, 2025):

Could you clarify what you mean by make it work on OpenWrt?
OpenWrt version, netbird version, the steps you followed, logs...

<!-- gh-comment-id:2679884762 --> @wehagy commented on GitHub (Feb 24, 2025): Could you clarify what you mean by `make it work on OpenWrt`? `OpenWrt` version, `netbird` version, the steps you followed, logs...
Author
Owner

@Abnersouza7 commented on GitHub (Feb 24, 2025):

I tried installing Netbird on my OpenWrt router using the standard curl command to download it via SSH. I received an error indicating that the service was not installed.

<!-- gh-comment-id:2679921480 --> @Abnersouza7 commented on GitHub (Feb 24, 2025): I tried installing Netbird on my OpenWrt router using the standard curl command to download it via SSH. I received an error indicating that the service was not installed.
Author
Owner

@Abnersouza7 commented on GitHub (Feb 24, 2025):

Tried with the latest netbird version and openwrt 22.01

<!-- gh-comment-id:2679922269 --> @Abnersouza7 commented on GitHub (Feb 24, 2025): Tried with the latest netbird version and openwrt 22.01
Author
Owner

@wehagy commented on GitHub (Feb 24, 2025):

I tried installing Netbird on my OpenWrt router using the standard curl command to download it via SSH. I received an error indicating that the service was not installed.

I'm not entirely sure, but did you download it from NetBird official GitHub? Keep in mind that netbird is available in the official OpenWrt repository.

Tried with the latest netbird version and openwrt 22.01

OpenWrt 22.03 is very outdated and has reached its end of life, netbird version 0.17.0 is old, https://github.com/openwrt/packages/blob/openwrt-22.03/net/netbird/Makefile. I recommend upgrading to OpenWrt 24.10 and installing netbird using opkg or LuCI.

If that's not feasible, I don't recommend it. However, you can probably download the appropriate ipk package from here https://downloads.openwrt.org/releases/24.10.0/packages/, you just need to know your architecture, for example, for x86_64, you can use this package https://downloads.openwrt.org/releases/24.10.0/packages/x86_64/packages/netbird_0.36.7-r1_x86_64.ipk, and then install it using opkg install.

After completing the netbird installation, make sure to follow this steps https://github.com/netbirdio/netbird/issues/2268#issuecomment-2240885460.

<!-- gh-comment-id:2679986260 --> @wehagy commented on GitHub (Feb 24, 2025): > I tried installing Netbird on my OpenWrt router using the standard curl command to download it via SSH. I received an error indicating that the service was not installed. I'm not entirely sure, but did you download it from NetBird official GitHub? Keep in mind that `netbird` is available in the official `OpenWrt` repository. > Tried with the latest netbird version and openwrt 22.01 `OpenWrt 22.03` is very outdated and has reached its end of life, `netbird` version 0.17.0 is old, https://github.com/openwrt/packages/blob/openwrt-22.03/net/netbird/Makefile. I recommend upgrading to `OpenWrt 24.10` and installing `netbird` using `opkg` or `LuCI`. **If that's not feasible, I don't recommend it**. However, you can probably download the appropriate `ipk` package from here https://downloads.openwrt.org/releases/24.10.0/packages/, you just need to know your architecture, for example, for `x86_64`, you can use this package https://downloads.openwrt.org/releases/24.10.0/packages/x86_64/packages/netbird_0.36.7-r1_x86_64.ipk, and then install it using `opkg install`. After completing the `netbird` installation, make sure to follow this steps https://github.com/netbirdio/netbird/issues/2268#issuecomment-2240885460.
Author
Owner

@nazarewk commented on GitHub (Feb 25, 2025):

At a point I did run Netbird on OpenWRT and (separately) it's Teltonika flavor on RUTX50 without many issues (apart from the initial environment setup).

I will try to revive my setups and gather set of steps required to run it in a few days when I have less busy time.

<!-- gh-comment-id:2683307178 --> @nazarewk commented on GitHub (Feb 25, 2025): At a point I did run Netbird on OpenWRT and (separately) it's Teltonika flavor on RUTX50 without many issues (apart from the initial environment setup). I will try to revive my setups and gather set of steps required to run it in a few days when I have less busy time.
Author
Owner

@wehagy commented on GitHub (Feb 26, 2025):

If I'm not mistaken, RutOS is using an older version of OpenWrt, or for some other reason, it doesn't have nftables but rather iptables, I'm not certain if this is the issue, but to ensure that netbird works with OpenWrt 22.03, you will likely need to set the variables NB_DISABLE_CUSTOM_ROUTING=true and NB_SKIP_SOCKET_MARK=true. These variables may be necessary, especially if you have mwan3 installed.

<!-- gh-comment-id:2686251712 --> @wehagy commented on GitHub (Feb 26, 2025): If I'm not mistaken, `RutOS` is using an older version of `OpenWrt`, or for some other reason, it doesn't have `nftables` but rather `iptables`, I'm not certain if this is the issue, but to ensure that `netbird` works with `OpenWrt 22.03`, you will likely need to set the variables `NB_DISABLE_CUSTOM_ROUTING=true` and `NB_SKIP_SOCKET_MARK=true`. These variables may be necessary, especially if you have `mwan3` installed.
Author
Owner

@leros1337 commented on GitHub (Feb 27, 2025):

netbird working on 24.10 openwrt for me, 0.36.7 version in repo (you need netbird login --setup-key *** before run/start), but it down everyday, so my router shutdown it or netbird crashes, need a bit time to research

<!-- gh-comment-id:2687019197 --> @leros1337 commented on GitHub (Feb 27, 2025): netbird working on 24.10 openwrt for me, 0.36.7 version in repo (you need `netbird login --setup-key ***` before run/start), but it down everyday, so my router shutdown it or netbird crashes, need a bit time to research
Author
Owner

@nazarewk commented on GitHub (Feb 27, 2025):

netbird working on 24.10 openwrt for me, 0.36.7 version in repo (you need netbird login --setup-key *** before run/start), but it down everyday, so my router shutdown it or netbird crashes, need a bit time to research

maybe your router runs out of memory? most consumer routers have very little RAM.

<!-- gh-comment-id:2687042953 --> @nazarewk commented on GitHub (Feb 27, 2025): > netbird working on 24.10 openwrt for me, 0.36.7 version in repo (you need `netbird login --setup-key ***` before run/start), but it down everyday, so my router shutdown it or netbird crashes, need a bit time to research maybe your router runs out of memory? most consumer routers have very little RAM.
Author
Owner

@leros1337 commented on GitHub (Feb 27, 2025):

maybe your router runs out of memory? most consumer routers have very little RAM.

no, its fine, have 50% of free ram (asus ax4200). My thought something conflicting with netbird, because in logs i see

2025-02-27T06:21:32Z ERRO client/internal/dns/file_unix.go:142: Failed to remove netbird nameserver from /etc/resolv.conf.original.netbird on backup restore: parse backup resolv.conf: failed to open /etc/resolv.conf.original.netbird file: open /etc/resolv.conf.original.netbird: no such file or directory
2025-02-27T06:21:32Z ERRO client/internal/dns/server.go:280: failed to restore host DNS settings: restoring /etc/resolv.conf from /etc/resolv.conf.original.netbird: checking stats for /etc/resolv.conf.original.netbird file when copying it. Error: stat /etc/resolv.conf.original.netbird: no such file or directory
2025-02-27T06:21:33Z ERRO client/iface/bind/udp_mux_universal.go:93: error while reading packet: shared socked stopped
2025-02-27T06:21:38Z ERRO signal/client/grpc.go:413: error while handling message of Peer [key: 2WS+IGXpTyZe8dY7rd9kOGpuqJRj6JBjQ8kCx2G2yxw=] error: [wrongly addressed message 2WS+IGXpTyZe8dY7rd9kOGpuqJRj6JBjQ8kCx2G2yxw=]
2025-02-27T06:21:38Z ERRO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:427: peer not found: sha-/Lby5Rt4SS9/tahyO3RvBcZ1sRTaM1eYqfihbTqZI3A=
2025-02-27T06:21:38Z ERRO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:427: peer not found: sha-/Lby5Rt4SS9/tahyO3RvBcZ1sRTaM1eYqfihbTqZI3A=
2025-02-27T06:21:38Z ERRO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:427: peer not found: sha-/Lby5Rt4SS9/tahyO3RvBcZ1sRTaM1eYqfihbTqZI3A=
2025-02-27T06:21:38Z ERRO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:427: peer not found: sha-/Lby5Rt4SS9/tahyO3RvBcZ1sRTaM1eYqfihbTqZI3A=
2025-02-27T06:21:38Z ERRO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:427: peer not found: sha-/Lby5Rt4SS9/tahyO3RvBcZ1sRTaM1eYqfihbTqZI3A=
2025-02-27T06:21:38Z ERRO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:427: peer not found: sha-/Lby5Rt4SS9/tahyO3RvBcZ1sRTaM1eYqfihbTqZI3A=
2025-02-27T06:21:38Z ERRO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:427: peer not found: sha-/Lby5Rt4SS9/tahyO3RvBcZ1sRTaM1eYqfihbTqZI3A=
2025-02-27T06:21:38Z ERRO client/internal/dns/server.go:418: unable to configure DNS for this peer using file manager without a nameserver group with all domains configured

I have homeproxy package configured in tun tcp/udp mode. Ill open issue if find problem on netbird side

<!-- gh-comment-id:2687060155 --> @leros1337 commented on GitHub (Feb 27, 2025): > maybe your router runs out of memory? most consumer routers have very little RAM. no, its fine, have 50% of free ram (asus ax4200). My thought something conflicting with netbird, because in logs i see ``` 2025-02-27T06:21:32Z ERRO client/internal/dns/file_unix.go:142: Failed to remove netbird nameserver from /etc/resolv.conf.original.netbird on backup restore: parse backup resolv.conf: failed to open /etc/resolv.conf.original.netbird file: open /etc/resolv.conf.original.netbird: no such file or directory 2025-02-27T06:21:32Z ERRO client/internal/dns/server.go:280: failed to restore host DNS settings: restoring /etc/resolv.conf from /etc/resolv.conf.original.netbird: checking stats for /etc/resolv.conf.original.netbird file when copying it. Error: stat /etc/resolv.conf.original.netbird: no such file or directory 2025-02-27T06:21:33Z ERRO client/iface/bind/udp_mux_universal.go:93: error while reading packet: shared socked stopped 2025-02-27T06:21:38Z ERRO signal/client/grpc.go:413: error while handling message of Peer [key: 2WS+IGXpTyZe8dY7rd9kOGpuqJRj6JBjQ8kCx2G2yxw=] error: [wrongly addressed message 2WS+IGXpTyZe8dY7rd9kOGpuqJRj6JBjQ8kCx2G2yxw=] 2025-02-27T06:21:38Z ERRO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:427: peer not found: sha-/Lby5Rt4SS9/tahyO3RvBcZ1sRTaM1eYqfihbTqZI3A= 2025-02-27T06:21:38Z ERRO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:427: peer not found: sha-/Lby5Rt4SS9/tahyO3RvBcZ1sRTaM1eYqfihbTqZI3A= 2025-02-27T06:21:38Z ERRO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:427: peer not found: sha-/Lby5Rt4SS9/tahyO3RvBcZ1sRTaM1eYqfihbTqZI3A= 2025-02-27T06:21:38Z ERRO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:427: peer not found: sha-/Lby5Rt4SS9/tahyO3RvBcZ1sRTaM1eYqfihbTqZI3A= 2025-02-27T06:21:38Z ERRO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:427: peer not found: sha-/Lby5Rt4SS9/tahyO3RvBcZ1sRTaM1eYqfihbTqZI3A= 2025-02-27T06:21:38Z ERRO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:427: peer not found: sha-/Lby5Rt4SS9/tahyO3RvBcZ1sRTaM1eYqfihbTqZI3A= 2025-02-27T06:21:38Z ERRO [relay: rels://streamline-de-fra1-0.relay.netbird.io:443] relay/client/client.go:427: peer not found: sha-/Lby5Rt4SS9/tahyO3RvBcZ1sRTaM1eYqfihbTqZI3A= 2025-02-27T06:21:38Z ERRO client/internal/dns/server.go:418: unable to configure DNS for this peer using file manager without a nameserver group with all domains configured ``` I have homeproxy package configured in `tun tcp/udp` mode. Ill open issue if find problem on netbird side
Author
Owner

@hotfur commented on GitHub (Mar 16, 2025):

I think I have similar problem with @leros1337. I started netbird with service netbird enable then service netbird start but the next day service netbird status showed netbird not running. I do not know if netbird crashed due to OOM after some time (memory leaks?) and Openwrt killed it.

<!-- gh-comment-id:2727819885 --> @hotfur commented on GitHub (Mar 16, 2025): I think I have similar problem with @leros1337. I started netbird with `service netbird enable` then `service netbird start` but the next day `service netbird status` showed netbird not running. I do not know if netbird crashed due to OOM after some time (memory leaks?) and Openwrt killed it.
Author
Owner

@nazarewk commented on GitHub (Mar 17, 2025):

I think I have similar problem with @leros1337. I started netbird with service netbird enable then service netbird start but the next day service netbird status showed netbird not running. I do not know if netbird crashed due to OOM after some time (memory leaks?) and Openwrt killed it.

I'm not an expert here, but I have observed OpenWRT wiping any manual changes (actually files not tracked through packages nor marked for persistence) at least during system updates, but possibly during single-package updates and reboots too. This means netbird service install result will get wiped ocasionally.

Personally, I have configured a custom /etc/rc.local to chain load scripts from a persistent location (USB stick):

root@drek:~# cat /etc/rc.local 
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
persistence="/mnt/diablo"

until [ -d "$persistence" ]; do
  echo "waiting for $persistence"
  sleep 5
done
ret=0
for script in "$persistence/rc.local.d"/*; do if [ -x "$script" ]; then "$script" || ret=$?; fi; done

exit "$ret"
<!-- gh-comment-id:2729349268 --> @nazarewk commented on GitHub (Mar 17, 2025): > I think I have similar problem with [@leros1337](https://github.com/leros1337?rgh-link-date=2025-03-17T01%3A41%3A02.000Z). I started netbird with `service netbird enable` then `service netbird start` but the next day `service netbird status` showed netbird not running. I do not know if netbird crashed due to OOM after some time (memory leaks?) and Openwrt killed it. I'm not an expert here, but I have observed OpenWRT wiping any manual changes (actually files not tracked through packages nor marked for persistence) at least during system updates, but possibly during single-package updates and reboots too. This means `netbird service install` result will get wiped ocasionally. Personally, I have configured a custom `/etc/rc.local` to chain load scripts from a persistent location (USB stick): ``` root@drek:~# cat /etc/rc.local # Put your custom commands here that should be executed once # the system init finished. By default this file does nothing. persistence="/mnt/diablo" until [ -d "$persistence" ]; do echo "waiting for $persistence" sleep 5 done ret=0 for script in "$persistence/rc.local.d"/*; do if [ -x "$script" ]; then "$script" || ret=$?; fi; done exit "$ret" ```
Author
Owner

@hotfur commented on GitHub (Mar 25, 2025):

The host have been up for more than a week now, and netbird did not seem to be down again. Collectd showed that there is no memory spike during the entire operation time. I will continue to observe for any service disruption.

Image

@nazarewk Certainly OpenWrt will not keep Netbird config after a firmware upgrade. I am not sure about reboot? Result of mount:

/dev/root on /rom type squashfs (ro,relatime,errors=continue)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/ubi0_1 on /overlay type ubifs (rw,noatime,assert=read-only,ubi=0,vol=1)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,noatime)
bpffs on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)

There is overlayfs, maybe that's the reason for which changes got discarded? Your workaround will work for devices which have USB ports. But for those don't then they will have to rely on complicated network setup, perhaps with a NAS. I think there are ways to persist changes.

<!-- gh-comment-id:2750887632 --> @hotfur commented on GitHub (Mar 25, 2025): The host have been up for more than a week now, and netbird did not seem to be down again. Collectd showed that there is no memory spike during the entire operation time. I will continue to observe for any service disruption. ![Image](https://github.com/user-attachments/assets/d54fb8c7-5c57-42ff-af8a-2a91e7612038) @nazarewk Certainly OpenWrt will not keep Netbird config after a firmware upgrade. I am not sure about reboot? Result of mount: ``` /dev/root on /rom type squashfs (ro,relatime,errors=continue) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate) tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime) /dev/ubi0_1 on /overlay type ubifs (rw,noatime,assert=read-only,ubi=0,vol=1) overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work) tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000) debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,noatime) bpffs on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700) ``` There is overlayfs, maybe that's the reason for which changes got discarded? Your workaround will work for devices which have USB ports. But for those don't then they will have to rely on complicated network setup, perhaps with a NAS. I think there are ways to persist changes.
Author
Owner

@wehagy commented on GitHub (Apr 4, 2025):

Reboots are not supposed to exclude the netbird configuration, and firmware upgrades shouldn't either, provided you have installed netbird from the official OpenWrt 24.10 repository and followed the correct step-by-step process for the upgrade. The easiest method to perform the upgrade is to use the luci-app-attendedsysupgrade through the LuCI interface, or alternatively, you can use the command line with owut.

To view all files that will be preserved during upgrades run sysupgrade -l, the important line to note is /etc/netbird/config.json:

/etc/config/dhcp
/etc/config/dropbear
/etc/config/dropbear.apk-new
/etc/config/firewall
/etc/config/firewall.apk-new
/etc/config/luci
/etc/config/luci.apk-new
/etc/config/network
/etc/config/rpcd
/etc/config/scripts/healthcheck.sh
/etc/config/sqm
/etc/config/system
/etc/config/uhttpd
/etc/config/wireless
/etc/crontabs/root
/etc/dropbear/authorized_keys
/etc/dropbear/dropbear_ed25519_host_key
/etc/dropbear/dropbear_rsa_host_key
/etc/group
/etc/hosts
/etc/inittab
/etc/iproute2/rt_tables
/etc/luci-uploads/.placeholder
/etc/netbird/config.json
/etc/nftables.d/10-custom-filter-chains.nft
/etc/nftables.d/README
/etc/passwd
/etc/profile
/etc/profile.d/busybox-history-file.sh
/etc/rc.local
/etc/shadow
/etc/shells
/etc/shinit
/etc/sysctl.conf
/etc/sysupgrade.conf
/etc/uhttpd.crt
/etc/uhttpd.key

To add or remove files from this list, you can edit /etc/sysupgrade.conf:

## This file contains files and directories that should
## be preserved during an upgrade.

# /etc/example.conf
# /etc/openvpn/

# NetBird config
/etc/netbird/config.json
# NetBird init
/etc/init.d/netbird

However, if you installed netbird from OpenWrt, there is no need to add these entries.

<!-- gh-comment-id:2778909552 --> @wehagy commented on GitHub (Apr 4, 2025): Reboots are not supposed to exclude the netbird configuration, and firmware upgrades shouldn't either, provided you have installed `netbird` from the official `OpenWrt 24.10` repository and followed the correct step-by-step process for the upgrade. The easiest method to perform the upgrade is to use the `luci-app-attendedsysupgrade` through the LuCI interface, or alternatively, you can use the command line with `owut`. To view all files that will be preserved during upgrades run `sysupgrade -l`, the important line to note is `/etc/netbird/config.json`: ``` /etc/config/dhcp /etc/config/dropbear /etc/config/dropbear.apk-new /etc/config/firewall /etc/config/firewall.apk-new /etc/config/luci /etc/config/luci.apk-new /etc/config/network /etc/config/rpcd /etc/config/scripts/healthcheck.sh /etc/config/sqm /etc/config/system /etc/config/uhttpd /etc/config/wireless /etc/crontabs/root /etc/dropbear/authorized_keys /etc/dropbear/dropbear_ed25519_host_key /etc/dropbear/dropbear_rsa_host_key /etc/group /etc/hosts /etc/inittab /etc/iproute2/rt_tables /etc/luci-uploads/.placeholder /etc/netbird/config.json /etc/nftables.d/10-custom-filter-chains.nft /etc/nftables.d/README /etc/passwd /etc/profile /etc/profile.d/busybox-history-file.sh /etc/rc.local /etc/shadow /etc/shells /etc/shinit /etc/sysctl.conf /etc/sysupgrade.conf /etc/uhttpd.crt /etc/uhttpd.key ``` To add or remove files from this list, you can edit `/etc/sysupgrade.conf`: ``` ## This file contains files and directories that should ## be preserved during an upgrade. # /etc/example.conf # /etc/openvpn/ # NetBird config /etc/netbird/config.json # NetBird init /etc/init.d/netbird ``` However, if you installed `netbird` from OpenWrt, there is no need to add these entries.
Author
Owner

@nazarewk commented on GitHub (Apr 7, 2025):

@wehagy I've recently tried installing from tbc0309/openwrt-netbird on RutOS. In context of what you wrote it seems like this piece of code should persist the changes?

<!-- gh-comment-id:2783424270 --> @nazarewk commented on GitHub (Apr 7, 2025): @wehagy I've recently tried installing from [tbc0309/openwrt-netbird](https://github.com/tbc0309/openwrt-netbird) on RutOS. In context of what you wrote it seems like [this piece of code](https://github.com/tbc0309/openwrt-netbird/blob/157438e796ec21e4126930319aa67fe72c5c91c6/netbird/Makefile#L43-L45) should persist the changes?
Author
Owner

@wehagy commented on GitHub (Apr 8, 2025):

If you are building the package yourself, then yes, this is where you declare the files you want to preserve. You can also declare folders, such as /etc/foo/, you can confirm if this works with the sysupgrade -l command after installing the package, but the folder or file needs to exist in order to be displayed in the output.

<!-- gh-comment-id:2786821865 --> @wehagy commented on GitHub (Apr 8, 2025): If you are building the package yourself, then yes, this is where you declare the files you want to preserve. You can also declare folders, such as `/etc/foo/`, you can confirm if this works with the `sysupgrade -l` command after installing the package, but the folder or file needs to exist in order to be displayed in the output.
Author
Owner

@sandmix commented on GitHub (May 13, 2025):

On Openwwrt 24.10.1 not stable disconnects and fails in couple of hours with tun error or some other, working good on 23.05.05.

<!-- gh-comment-id:2876743109 --> @sandmix commented on GitHub (May 13, 2025): On Openwwrt 24.10.1 not stable disconnects and fails in couple of hours with tun error or some other, working good on 23.05.05.
Author
Owner

@agent-am commented on GitHub (Dec 31, 2025):

Apologies in advance, this might be known issue. I tried to read Netbird Support/Discussion Thread - #40 by egc and applied some of recommended methods, but didn't work for me. Hence, I add complete work I did so far.

Deployment of NetBird on OpenWrt 23.05

Original router is EDUP RT2983 AX1800

Version

OpenWrt 23.05-SNAPSHOT, r24217-e7ea5024e0

The initial change is that default network has changed from 192.168.1.1 to 192.168.3.1 to avoid conflict
with the main router.
The main router has connection with the internet (FttH, 1Gpbs). The LAN port of main router is connected to
OpenWrt router as WAN port.

Netbird setup

I have followed https://raw.githubusercontent.com/egc112/OpenWRT-egc-add-on/main/notes/OpenWRT%20Netbird.pdf instructions from egc (thanks to him!)

root@OpenWrt:~# opkg update
...
root@OpenWrt:~# opkg install netbird
Package netbird (0.24.3-1) installed in root is up to date.

You can see the configuration updates below.

Separatelly to OpenWrt, I have installed NetBird app on my iPhone. Both OpenWrt and iPhone are registered ok.

Netbird configuration on OpenWrt

root@OpenWrt:~# netbird status -d
Peers detail:
 iphone-aleksandar.netbird.cloud:
  NetBird IP: 100.107.120.242/32
  Public key: vkZveWS6OLdmR/Zu4fCa5AT3yiOWZHMp5HOiebo+q3s=
  Status: Disconnected
  -- detail --
  Connection type:
  Direct: false
  ICE candidate (Local/Remote): -/-
  Last connection update: 2025-12-31 10:43:41

Daemon version: 0.24.3
CLI version: 0.24.3
Management: Connected to https://api.wiretrustee.com:443
Signal: Connected to https://signal.netbird.io:443
FQDN: openwrt.netbird.cloud
NetBird IP: 100.107.92.184/16
Interface type: Kernel
Peers count: 0/1 Connected
root@OpenWrt:~# ip addr show wt0
15: wt0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1280 qdisc noqueue state UNKNOWN group default qlen 1000
    link/none
    inet 100.107.92.184/16 brd 100.107.255.255 scope global wt0
       valid_lft forever preferred_lft forever
root@OpenWrt:~# ip route
default via 192.168.1.1 dev wan proto static src 192.168.1.55 metric 40
100.107.0.0/16 dev wt0 proto kernel scope link src 100.107.92.184
192.168.1.0/24 dev wan proto static scope link metric 40
192.168.3.0/24 dev br-lan proto kernel scope link src 192.168.3.1
2025-12-31T10:43:37Z INFO client/cmd/service_controller.go:79: stopped Netbird service
2025-12-31T10:43:38Z INFO client/cmd/service_controller.go:23: starting Netbird service
2025-12-31T10:43:38Z INFO client/cmd/service_controller.go:63: started daemon server: /var/run/netbird.sock
2025-12-31T10:43:38Z INFO client/internal/connect.go:47: starting NetBird client version 0.24.3
2025-12-31T10:43:40Z WARN client/internal/wgproxy/factory_linux.go:15: failed to initialize ebpf proxy, fallback to user space proxy: field NbXdpProg: program nb_xdp_prog: load program: invalid argument: unknown func bpf_trace_printk#6 (101 line(s) omitted)
2025-12-31T10:43:41Z INFO client/internal/routemanager/firewall_linux.go:40: creating an nftables firewall manager for route rules
2025-12-31T10:43:41Z INFO iface/tun_linux.go:15: create tun interface with kernel WireGuard support: wt0
2025-12-31T10:43:41Z INFO client/internal/connect.go:182: Netbird engine started, my IP is: 100.107.92.184/16
2025-12-31T10:43:41Z INFO signal/client/grpc.go:157: connected to the Signal Service stream
2025-12-31T10:43:41Z INFO management/client/grpc.go:143: connected to the Management Service stream
2025-12-31T10:43:41Z WARN client/internal/dns/server.go:263: the DNS manager of this peer doesn't support custom port. Disabling primary DNS setup. Learn more at: https://docs.netbird.io/how-to/manage-dns-in-your-network#local-resolver
2025-12-31T10:43:41Z ERRO client/internal/dns/server.go:269: unable to configure DNS for this peer using file manager without a nameserver group with all domains configured
2025-12-31T10:43:42Z INFO client/internal/acl/manager.go:67: ACL rules processed in: 127.235757ms, total rules count: 2

Based on above log, I searched and followed instructions in https://forum.openwrt.org/t/using-netbird-with-dnsmasq/218358/3?u=wehagy

My configuration is now as follows:

root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fddb:0f0f:7c50::/48'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        option macaddr 'cc:d8:1f:47:b6:98'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'

config device
        option name 'lan1'
        option macaddr 'cc:d8:1f:47:b6:98'

config device
        option name 'lan2'
        option macaddr 'cc:d8:1f:47:b6:98'

config device
        option name 'lan3'
        option macaddr 'cc:d8:1f:47:b6:98'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.3.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'wan'
        option macaddr 'cc:d8:1f:47:b6:99'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'

config interface 'wan'
        option device 'wan'
        option proto 'dhcp'
        option metric '40'

config interface 'netbird'
        option proto 'none'
        option device 'wt0'
root@OpenWrt:~# cat /etc/config/firewall

config defaults
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option fullcone '1'
        option brcmfullcone '0'
        option flow_offloading '1'
        option flow_offloading_hw '1'
        option synflood_protect '1'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'

config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option fullcone4 '1'
        option fullcone6 '1'
        option masq '1'
        option mtu_fix '1'
        list network 'wan'
        list network 'wan6'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

config zone
        option name 'netbird'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'netbird'
        option masq '1'
        option mtu_fix '1'

config forwarding
        option src 'netbird'
        option dest 'wan'

config forwarding
        option src 'netbird'
        option dest 'lan'

config forwarding
        option src 'lan'
        option dest 'netbird'

Problem

I have still the DNS issue with Netbird on my OpenWrt. Probably that's the main reason of not able to establishing a P2P connection with my iPhone client.

Any idea on what to do?

<!-- gh-comment-id:3702558035 --> @agent-am commented on GitHub (Dec 31, 2025): Apologies in advance, this might be known issue. I tried to read [Netbird Support/Discussion Thread - #40 by egc](https://forum.openwrt.org/t/netbird-support-discussion-thread/237831/40) and applied some of recommended methods, but didn't work for me. Hence, I add complete work I did so far. ## Deployment of NetBird on OpenWrt 23.05 Original router is EDUP RT2983 AX1800 ### Version ``` OpenWrt 23.05-SNAPSHOT, r24217-e7ea5024e0 ``` The initial change is that default network has changed from 192.168.1.1 to 192.168.3.1 to avoid conflict with the main router. The main router has connection with the internet (FttH, 1Gpbs). The LAN port of main router is connected to OpenWrt router as WAN port. ### Netbird setup I have followed https://raw.githubusercontent.com/egc112/OpenWRT-egc-add-on/main/notes/OpenWRT%20Netbird.pdf instructions from egc (thanks to him!) ``` root@OpenWrt:~# opkg update ... root@OpenWrt:~# opkg install netbird Package netbird (0.24.3-1) installed in root is up to date. ``` You can see the configuration updates below. Separatelly to OpenWrt, I have installed NetBird app on my iPhone. Both OpenWrt and iPhone are registered ok. ### Netbird configuration on OpenWrt ``` root@OpenWrt:~# netbird status -d Peers detail: iphone-aleksandar.netbird.cloud: NetBird IP: 100.107.120.242/32 Public key: vkZveWS6OLdmR/Zu4fCa5AT3yiOWZHMp5HOiebo+q3s= Status: Disconnected -- detail -- Connection type: Direct: false ICE candidate (Local/Remote): -/- Last connection update: 2025-12-31 10:43:41 Daemon version: 0.24.3 CLI version: 0.24.3 Management: Connected to https://api.wiretrustee.com:443 Signal: Connected to https://signal.netbird.io:443 FQDN: openwrt.netbird.cloud NetBird IP: 100.107.92.184/16 Interface type: Kernel Peers count: 0/1 Connected ``` ``` root@OpenWrt:~# ip addr show wt0 15: wt0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1280 qdisc noqueue state UNKNOWN group default qlen 1000 link/none inet 100.107.92.184/16 brd 100.107.255.255 scope global wt0 valid_lft forever preferred_lft forever ``` ``` root@OpenWrt:~# ip route default via 192.168.1.1 dev wan proto static src 192.168.1.55 metric 40 100.107.0.0/16 dev wt0 proto kernel scope link src 100.107.92.184 192.168.1.0/24 dev wan proto static scope link metric 40 192.168.3.0/24 dev br-lan proto kernel scope link src 192.168.3.1 ``` ``` 2025-12-31T10:43:37Z INFO client/cmd/service_controller.go:79: stopped Netbird service 2025-12-31T10:43:38Z INFO client/cmd/service_controller.go:23: starting Netbird service 2025-12-31T10:43:38Z INFO client/cmd/service_controller.go:63: started daemon server: /var/run/netbird.sock 2025-12-31T10:43:38Z INFO client/internal/connect.go:47: starting NetBird client version 0.24.3 2025-12-31T10:43:40Z WARN client/internal/wgproxy/factory_linux.go:15: failed to initialize ebpf proxy, fallback to user space proxy: field NbXdpProg: program nb_xdp_prog: load program: invalid argument: unknown func bpf_trace_printk#6 (101 line(s) omitted) 2025-12-31T10:43:41Z INFO client/internal/routemanager/firewall_linux.go:40: creating an nftables firewall manager for route rules 2025-12-31T10:43:41Z INFO iface/tun_linux.go:15: create tun interface with kernel WireGuard support: wt0 2025-12-31T10:43:41Z INFO client/internal/connect.go:182: Netbird engine started, my IP is: 100.107.92.184/16 2025-12-31T10:43:41Z INFO signal/client/grpc.go:157: connected to the Signal Service stream 2025-12-31T10:43:41Z INFO management/client/grpc.go:143: connected to the Management Service stream 2025-12-31T10:43:41Z WARN client/internal/dns/server.go:263: the DNS manager of this peer doesn't support custom port. Disabling primary DNS setup. Learn more at: https://docs.netbird.io/how-to/manage-dns-in-your-network#local-resolver 2025-12-31T10:43:41Z ERRO client/internal/dns/server.go:269: unable to configure DNS for this peer using file manager without a nameserver group with all domains configured 2025-12-31T10:43:42Z INFO client/internal/acl/manager.go:67: ACL rules processed in: 127.235757ms, total rules count: 2 ``` Based on above log, I searched and followed instructions in https://forum.openwrt.org/t/using-netbird-with-dnsmasq/218358/3?u=wehagy My configuration is now as follows: ``` root@OpenWrt:~# cat /etc/config/network config interface 'loopback' option device 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config globals 'globals' option ula_prefix 'fddb:0f0f:7c50::/48' option packet_steering '1' config device option name 'br-lan' option type 'bridge' option macaddr 'cc:d8:1f:47:b6:98' list ports 'lan1' list ports 'lan2' list ports 'lan3' config device option name 'lan1' option macaddr 'cc:d8:1f:47:b6:98' config device option name 'lan2' option macaddr 'cc:d8:1f:47:b6:98' config device option name 'lan3' option macaddr 'cc:d8:1f:47:b6:98' config interface 'lan' option device 'br-lan' option proto 'static' option ipaddr '192.168.3.1' option netmask '255.255.255.0' option ip6assign '60' config device option name 'wan' option macaddr 'cc:d8:1f:47:b6:99' config interface 'wan6' option device 'wan' option proto 'dhcpv6' config interface 'wan' option device 'wan' option proto 'dhcp' option metric '40' config interface 'netbird' option proto 'none' option device 'wt0' ``` ``` root@OpenWrt:~# cat /etc/config/firewall config defaults option input 'REJECT' option output 'ACCEPT' option forward 'REJECT' option fullcone '1' option brcmfullcone '0' option flow_offloading '1' option flow_offloading_hw '1' option synflood_protect '1' config zone option name 'lan' option input 'ACCEPT' option output 'ACCEPT' option forward 'ACCEPT' list network 'lan' config zone option name 'wan' option input 'REJECT' option output 'ACCEPT' option forward 'REJECT' option fullcone4 '1' option fullcone6 '1' option masq '1' option mtu_fix '1' list network 'wan' list network 'wan6' config forwarding option src 'lan' option dest 'wan' config rule option name 'Allow-DHCP-Renew' option src 'wan' option proto 'udp' option dest_port '68' option target 'ACCEPT' option family 'ipv4' config rule option name 'Allow-Ping' option src 'wan' option proto 'icmp' option icmp_type 'echo-request' option family 'ipv4' option target 'ACCEPT' config rule option name 'Allow-IGMP' option src 'wan' option proto 'igmp' option family 'ipv4' option target 'ACCEPT' config rule option name 'Allow-DHCPv6' option src 'wan' option proto 'udp' option dest_port '546' option family 'ipv6' option target 'ACCEPT' config rule option name 'Allow-MLD' option src 'wan' option proto 'icmp' option src_ip 'fe80::/10' list icmp_type '130/0' list icmp_type '131/0' list icmp_type '132/0' list icmp_type '143/0' option family 'ipv6' option target 'ACCEPT' config rule option name 'Allow-ICMPv6-Input' option src 'wan' option proto 'icmp' list icmp_type 'echo-request' list icmp_type 'echo-reply' list icmp_type 'destination-unreachable' list icmp_type 'packet-too-big' list icmp_type 'time-exceeded' list icmp_type 'bad-header' list icmp_type 'unknown-header-type' list icmp_type 'router-solicitation' list icmp_type 'neighbour-solicitation' list icmp_type 'router-advertisement' list icmp_type 'neighbour-advertisement' option limit '1000/sec' option family 'ipv6' option target 'ACCEPT' config rule option name 'Allow-ICMPv6-Forward' option src 'wan' option dest '*' option proto 'icmp' list icmp_type 'echo-request' list icmp_type 'echo-reply' list icmp_type 'destination-unreachable' list icmp_type 'packet-too-big' list icmp_type 'time-exceeded' list icmp_type 'bad-header' list icmp_type 'unknown-header-type' option limit '1000/sec' option family 'ipv6' option target 'ACCEPT' config rule option name 'Allow-IPSec-ESP' option src 'wan' option dest 'lan' option proto 'esp' option target 'ACCEPT' config rule option name 'Allow-ISAKMP' option src 'wan' option dest 'lan' option dest_port '500' option proto 'udp' option target 'ACCEPT' config zone option name 'netbird' option input 'ACCEPT' option output 'ACCEPT' option forward 'ACCEPT' list network 'netbird' option masq '1' option mtu_fix '1' config forwarding option src 'netbird' option dest 'wan' config forwarding option src 'netbird' option dest 'lan' config forwarding option src 'lan' option dest 'netbird' ``` ### Problem I have still the DNS issue with Netbird on my OpenWrt. Probably that's the main reason of not able to establishing a P2P connection with my iPhone client. Any idea on what to do?
Author
Owner

@looong-cat commented on GitHub (Jun 24, 2026):

I built a LuCI web app that lets you fully manage the NetBird client on OpenWrt/ImmortalWrt from the dashboard.

GitHub repository: https://github.com/looong-cat/luci-app-netbird

<!-- gh-comment-id:4792539849 --> @looong-cat commented on GitHub (Jun 24, 2026): I built a LuCI web app that lets you fully manage the NetBird client on OpenWrt/ImmortalWrt from the dashboard. GitHub repository: https://github.com/looong-cat/luci-app-netbird
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#6885