Deploy netbird in OpenWrt router > assign IP to netbird0 interface #1062

Closed
opened 2025-11-20 05:23:16 -05:00 by saavagebueno · 8 comments
Owner

Originally created by @cmonty14 on GitHub (Jul 13, 2024).

Describe the problem
I have installed netbird package on OpenWrt.
Starting service netbird works w/o problems.
Now I need to setup an interface and firewall rules.
For this I'm referring to OpenWrt wiki > Tailscale.
Here it's documented to modify /etc/init.d/tailscale by adding procd_append_param command --tun tailscale0.

Is there a similar configuration available for NetBird?
Currently my router shows this interface: wt0

Are you using NetBird Cloud?
yes

NetBird version
0.24.3

NetBird status -d output:
Peers detail:
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: myopenwrt.netbird.cloud
NetBird IP: 100.125.92.171/16
Interface type: Kernel
Peers count: 0/0 Connected

Originally created by @cmonty14 on GitHub (Jul 13, 2024). **Describe the problem** I have installed [netbird package](https://openwrt.org/packages/pkgdata/netbird) on OpenWrt. Starting service _netbird_ works w/o problems. Now I need to setup an interface and firewall rules. For this I'm referring to OpenWrt wiki > [Tailscale](https://openwrt.org/docs/guide-user/services/vpn/tailscale/start). Here it's documented to modify `/etc/init.d/tailscale` by adding `procd_append_param command --tun tailscale0`. Is there a similar configuration available for NetBird? Currently my router shows this interface: wt0 **Are you using NetBird Cloud?** yes **NetBird version** 0.24.3 **NetBird status -d output:** Peers detail: 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: myopenwrt.netbird.cloud NetBird IP: 100.125.92.171/16 Interface type: Kernel Peers count: 0/0 Connected
saavagebueno added the waiting-feedbacktriage-needed labels 2025-11-20 05:23:17 -05:00
Author
Owner

@wehagy commented on GitHub (Jul 19, 2024):

For me to make netbird work on openwrt snapshot:

opkg update
opkg install netbird kmod-wireguard
  • Stop netbird, login via setup keys, need to be created in netbird interface, and start netbird again:
service netbird stop
netbird login --setup-key <put your setup key here>
service netbird start
  • Go to luci Network -> Interfaces -> Add new interface... and Save:

    • Name: netbird
    • Protocol: Unmanaged
    • Device: wt0
  • Create a new firewall zone in Luci Network -> Firewall -> Zones -> Add and Save & Apply:

    • Name: netbird
    • Input: accept
    • Output: accept
    • Intra zone forward: accept
    • Covered networks: netbird
    • Allow forward to destination zones: lan put **wan** if you want to use exit node
    • Allow forward from source zones: lan

I guess that's all, I'm assuming you know how to set things up in the netbird interface.

Edit: For reference on how to configure the netbird DNS server, see Using netbird with dnsmasq

@wehagy commented on GitHub (Jul 19, 2024): For me to make `netbird` work on `openwrt snapshot`: - Install `netbird` and `kmod-wireguard` (dependency not installed by default, I have opened a PR, waiting merge). https://github.com/openwrt/packages/pull/23926 ```sh opkg update opkg install netbird kmod-wireguard ``` - Stop `netbird`, login via `setup keys`, need to be created in netbird interface, and start `netbird` again: ```sh service netbird stop netbird login --setup-key <put your setup key here> service netbird start ``` - Go to luci `Network -> Interfaces -> Add new interface...` and Save: - Name: **netbird** - Protocol: **Unmanaged** - Device: **wt0** - Create a new firewall zone in Luci `Network -> Firewall -> Zones -> Add` and Save & Apply: - Name: **netbird** - Input: **accept** - Output: **accept** - Intra zone forward: **accept** - Covered networks: **netbird** - Allow forward to destination zones: **lan** `put **wan** if you want to use exit node` - Allow forward from source zones: **lan** I guess that's all, I'm assuming you know how to set things up in the netbird interface. Edit: For reference on how to configure the `netbird` DNS server, see [Using netbird with dnsmasq](https://forum.openwrt.org/t/using-netbird-with-dnsmasq/218358/3?u=wehagy)
Author
Owner

@cmonty14 commented on GitHub (Jul 23, 2024):

I'm assuming you know how to set things up in the netbird interface.

Could you please share your recommendations for setting up netbird interface?

@cmonty14 commented on GitHub (Jul 23, 2024): > I'm assuming you know how to set things up in the netbird interface. Could you please share your recommendations for setting up netbird interface?
Author
Owner

@wehagy commented on GitHub (Jul 23, 2024):

Oops, I realized that my previous answer is dubious, when I say netbird interface I mean the web interface, configuring keys, routes, and access groups. The netbird wt0 interface does not need to do anything, just what is described above.

But the most important part is in the firewall where you may or may not be more or less restrictive, I configure it in the way I described above, so I can connect to the VPN just as the VPN can connect to my network, but I configure who can or cannot connect via the netbird web interface.

@wehagy commented on GitHub (Jul 23, 2024): Oops, I realized that my previous answer is dubious, when I say `netbird interface` I mean the `web interface`, configuring keys, routes, and access groups. The netbird `wt0` interface does not need to do anything, just what is described above. But the most important part is in the firewall where you may or may not be more or less restrictive, I configure it in the way I described above, so I can connect to the VPN just as the VPN can connect to my network, but I configure who can or cannot connect via the netbird `web interface`.
Author
Owner

@haldi4803 commented on GitHub (Jan 2, 2025):

Edit: For reference on how to configure the netbird DNS server, see Using netbird with dnsmasq

-.- yeah.... good to know.
Thanks a lot. Kept wondering why that shit just wouldn't work as exit node.

@haldi4803 commented on GitHub (Jan 2, 2025): > Edit: For reference on how to configure the `netbird` DNS server, see [Using netbird with dnsmasq](https://forum.openwrt.org/t/using-netbird-with-dnsmasq/218358/3?u=wehagy) -.- yeah.... good to know. Thanks a lot. Kept wondering why that shit just wouldn't work as exit node.
Author
Owner

@wehagy commented on GitHub (Jan 2, 2025):

Thanks a lot. Kept wondering why that shit just wouldn't work as exit node.

Maybe you forgot to include wan in the part where it is mentioned?

[...]

  • Create a new firewall zone in Luci Network -> Firewall -> Zones -> Add and Save & Apply:

    [...]

    • Allow forward to destination zones: lan put **wan** if you want to use exit node

    [...]

In the netbird WebGui is simple:

  • Click on Peers.
    • Choose the peer you want to designate as the exit node.
      • Select Assigned groups, create a new group named exit-clients, and press Enter.
      • Scroll down to Network Routes.
      • Click on Set Up Exit Node.
      • Add or create a Distribution Groups and select exit-clients.
        • Leave the Access Control Groups (optional) unchanged and click Continue.
      • Name your exit node as you wish in theNetwork Identifier and click Continue.
      • Click on Add Exit Node.
  • Go back to Access Control -> Policies.
    • Click on Add Policy.
    • In the Source and Destination fields, select the exit-clients group, then click Continue twice.
    • Name your rule as you wish, Add Policy.
  • Return to Peers.
    • Select the peer that you want to use with the exit node you just created.
    • Select Assigned groups, add the exit-clients group.
@wehagy commented on GitHub (Jan 2, 2025): > Thanks a lot. Kept wondering why that shit just wouldn't work as exit node. Maybe you forgot to include `wan` in the part where it is mentioned? > [...] > > - Create a new firewall zone in Luci `Network -> Firewall -> Zones -> Add` and Save & Apply: > > [...] > > - Allow forward to destination zones: **lan** `put **wan** if you want to use exit node` > > [...] In the `netbird` WebGui is simple: - Click on `Peers`. - Choose the `peer` you want to designate as the `exit node`. - Select `Assigned groups`, create a new group named `exit-clients`, and press Enter. - Scroll down to `Network Routes`. - Click on `Set Up Exit Node`. - Add or create a `Distribution Groups` and select `exit-clients`. - Leave the `Access Control Groups (optional)` unchanged and click `Continue`. - Name your exit node as you wish in the`Network Identifier` and click `Continue`. - Click on `Add Exit Node`. - Go back to `Access Control` -> `Policies`. - Click on `Add Policy`. - In the `Source` and `Destination` fields, select the `exit-clients` group, then click `Continue` twice. - Name your rule as you wish, `Add Policy`. - Return to `Peers`. - Select the `peer` that you want to use with the exit node you just created. - Select `Assigned groups`, add the `exit-clients` group.
Author
Owner

@euh2 commented on GitHub (Jan 25, 2025):

The Exit node feature is available from version 0.27.0, while the netbird package in Openwrt is currently on version 0.24.3. The new Openwrt 24.10 release (expected soon) will bring an update version of Netbird.

@euh2 commented on GitHub (Jan 25, 2025): The Exit node feature is [available from version 0.27.0](https://docs.netbird.io/how-to/configuring-default-routes-for-internet-traffic), while the netbird package in Openwrt is currently on version 0.24.3. The new Openwrt 24.10 release (expected soon) will bring an update version of Netbird.
Author
Owner

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

Hello @cmonty14,

We're currently reviewing our open issues and would like to verify if this problem still exists in the latest NetBird version.

Could you please confirm if the issue is still there?

We may close this issue temporarily if we don't hear back from you within 2 weeks, but feel free to reopen it with updated information.

Thanks for your contribution to improving the project!

@nazarewk commented on GitHub (Apr 28, 2025): Hello @cmonty14, We're currently reviewing our open issues and would like to verify if this problem still exists in the [latest NetBird version](https://github.com/netbirdio/netbird/releases). Could you please confirm if the issue is still there? We may close this issue temporarily if we don't hear back from you within **2 weeks**, but feel free to reopen it with updated information. Thanks for your contribution to improving the project!
Author
Owner

@mlsmaycon commented on GitHub (Jun 1, 2025):

closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.

@mlsmaycon commented on GitHub (Jun 1, 2025): closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1062