[GH-ISSUE #5391] exit node inside a Docker container #10480

Open
opened 2026-08-05 01:26:04 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @AlbertHakvoort on GitHub (Feb 19, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5391

Describe the problem

When using Netbird as an exit node inside a Docker container (network_mode: host), no internet access is provided to clients when the default 0.0.0.0/0 route is assigned. However, specific routes (e.g. /32) do work correctly.

The root cause is that the netbird-rt-fwd nftables chain does not receive an accept rule for 0.0.0.0/0, while specific routes do get one.

To Reproduce

  1. Deploy netbirdio/netbird:0.65.2 as an exit node in Docker with network_mode: host
  2. Configure a 0.0.0.0/0 exit route in the self-hosted Netbird dashboard
  3. Assign it to a peer group
  4. From a client, activate the exit node
  5. Internet access fails

On the exit node host, inspect nftables:

nft list chain ip netbird netbird-rt-fwd

Result:

chain netbird-rt-fwd {
    ct state established,related counter accept
    ip daddr 146.103.47.30 counter accept    # ← specific route works
    # ← NO 0.0.0.0/0 accept rule!
}

The netbird-acl-forward-filter chain then drops all other traffic from wt0:

chain netbird-acl-forward-filter {
    meta mark 0x0001bd20 accept
    iifname "wt0" jump netbird-rt-fwd
    iifname "wt0" drop                       # ← all non-matched traffic is dropped
}

Workaround

Manually adding the accept rule immediately restores internet for exit node clients:

nft add rule ip netbird netbird-rt-fwd ip daddr 0.0.0.0/0 accept

This must be re-applied after every Netbird restart as the rules are regenerated.

Expected behavior

When a 0.0.0.0/0 exit route is configured in the dashboard, the netbird-rt-fwd chain should contain an ip daddr 0.0.0.0/0 accept rule (or equivalent catch-all) so that internet traffic is properly forwarded.

Environment

  • NetBird version: 0.65.2
  • Running: Docker container with network_mode: host on Debian
  • Dashboard: Self-hosted
  • Host sysctl: net.ipv4.ip_forward=1, net.ipv4.conf.all.src_valid_mark=1
  • NAT: iptables -t nat -A POSTROUTING -s 100.64.0.0/10 ! -d 100.64.0.0/10 -j MASQUERADE

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings
Originally created by @AlbertHakvoort on GitHub (Feb 19, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5391 ## Describe the problem When using Netbird as an exit node inside a Docker container (`network_mode: host`), no internet access is provided to clients when the default `0.0.0.0/0` route is assigned. However, specific routes (e.g. `/32`) **do** work correctly. The root cause is that the `netbird-rt-fwd` nftables chain does not receive an accept rule for `0.0.0.0/0`, while specific routes do get one. ## To Reproduce 1. Deploy `netbirdio/netbird:0.65.2` as an exit node in Docker with `network_mode: host` 2. Configure a `0.0.0.0/0` exit route in the self-hosted Netbird dashboard 3. Assign it to a peer group 4. From a client, activate the exit node 5. Internet access fails On the exit node host, inspect nftables: ```bash nft list chain ip netbird netbird-rt-fwd ``` Result: ``` chain netbird-rt-fwd { ct state established,related counter accept ip daddr 146.103.47.30 counter accept # ← specific route works # ← NO 0.0.0.0/0 accept rule! } ``` The `netbird-acl-forward-filter` chain then drops all other traffic from `wt0`: ``` chain netbird-acl-forward-filter { meta mark 0x0001bd20 accept iifname "wt0" jump netbird-rt-fwd iifname "wt0" drop # ← all non-matched traffic is dropped } ``` ## Workaround Manually adding the accept rule immediately restores internet for exit node clients: ```bash nft add rule ip netbird netbird-rt-fwd ip daddr 0.0.0.0/0 accept ``` This must be re-applied after every Netbird restart as the rules are regenerated. ## Expected behavior When a `0.0.0.0/0` exit route is configured in the dashboard, the `netbird-rt-fwd` chain should contain an `ip daddr 0.0.0.0/0 accept` rule (or equivalent catch-all) so that internet traffic is properly forwarded. ## Environment - **NetBird version:** 0.65.2 - **Running:** Docker container with `network_mode: host` on Debian - **Dashboard:** Self-hosted - **Host sysctl:** `net.ipv4.ip_forward=1`, `net.ipv4.conf.all.src_valid_mark=1` - **NAT:** `iptables -t nat -A POSTROUTING -s 100.64.0.0/10 ! -d 100.64.0.0/10 -j MASQUERADE` ## Have you tried these troubleshooting steps? - [x] Reviewed client troubleshooting - [x] Checked for newer NetBird versions - [x] Searched for similar issues on GitHub (including closed ones) - [x] Restarted the NetBird client - [x] Disabled other VPN software - [x] Checked firewall settings
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#10480