[PR #1056] [MERGED] Allow netbird traffic #14784

Open
opened 2026-08-05 03:06:18 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1056
Author: @gigovich
Created: 8/7/2023
Status: Merged
Merged: 9/5/2023
Merged by: @mlsmaycon

Base: mainHead: allow-netbird-traffic


📝 Commits (10+)

  • f7862e7 Allow Netbird interface traffic handler in firewall managers
  • 5bb7d39 Add Default Allow Rule for nftables
  • d70b1d9 Enhance firewall rules for Netbird interface traffic allow:
  • 4b849b5 Remove allow Netbird traffic when reset rules
  • 2e4b55b Skip checking rules if allow Netbird traffic chain didn't exist
  • b9c49ee Allow netbird traffic on windows (#1071)
  • 0bfea90 Enable netbird traffic through uspfilter on Linux systems (#1091)
  • 37d66b0 decouple linux firewall check
  • 3ffb1f1 Merge branch 'main' into allow-netbird-traffic
  • e87b789 using check fw for routemanager

📊 Changes

24 files changed (+568 additions, -153 deletions)

View changed files

📝 .gitignore (+1 -0)
📝 client/firewall/firewall.go (+3 -0)
📝 client/firewall/iptables/manager_linux.go (+46 -18)
📝 client/firewall/iptables/manager_linux_test.go (+5 -3)
📝 client/firewall/nftables/manager_linux.go (+121 -8)
client/firewall/uspfilter/allow_netbird.go (+19 -0)
client/firewall/uspfilter/allow_netbird_linux.go (+21 -0)
client/firewall/uspfilter/allow_netbird_windows.go (+91 -0)
📝 client/firewall/uspfilter/uspfilter.go (+9 -11)
📝 client/firewall/uspfilter/uspfilter_test.go (+8 -0)
📝 client/internal/acl/manager_create.go (+5 -0)
📝 client/internal/acl/manager_create_linux.go (+52 -10)
📝 client/internal/acl/manager_test.go (+30 -10)
client/internal/checkfw/check.go (+3 -0)
client/internal/checkfw/check_linux.go (+56 -0)
📝 client/internal/routemanager/firewall_linux.go (+15 -13)
📝 client/internal/routemanager/firewall_nonlinux.go (+4 -3)
📝 client/internal/routemanager/iptables_linux.go (+13 -19)
📝 client/internal/routemanager/iptables_linux_test.go (+3 -2)
📝 client/internal/routemanager/manager.go (+2 -2)

...and 4 more files

📄 Description

Describe your changes

Enhancements to Netbird Interface Firewall Management

In Windows and Linux systems, there have been scenarios where firewall restrictions hinder the traffic on the Netbird network interface. This PR addresses the issue by enhancing how we manage firewall rules for the Netbird interface.

Changes

  • Introduced the AllowNetbird method across all Netbird firewall managers. This method is invoked by the ACL manager during initialization, ensuring traffic flow through the Netbird network interface.

  • For Linux, a default rule has been established in the "INPUT" chain of the "filter" table, allowing all incoming traffic from the Netbird network interface in booth firewall managers iptables and nftables.

  • For Windows, this PR does not include implementation.

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/1056 **Author:** [@gigovich](https://github.com/gigovich) **Created:** 8/7/2023 **Status:** ✅ Merged **Merged:** 9/5/2023 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `allow-netbird-traffic` --- ### 📝 Commits (10+) - [`f7862e7`](https://github.com/netbirdio/netbird/commit/f7862e7181a4cff3d7afa4c59a0b0f1f6eb834cd) Allow Netbird interface traffic handler in firewall managers - [`5bb7d39`](https://github.com/netbirdio/netbird/commit/5bb7d3980b369e730ec502bb7a82f2ef75c0af67) Add Default Allow Rule for nftables - [`d70b1d9`](https://github.com/netbirdio/netbird/commit/d70b1d96b6cac74a859e6a8cb186ab7a0ff89bd5) Enhance firewall rules for Netbird interface traffic allow: - [`4b849b5`](https://github.com/netbirdio/netbird/commit/4b849b53c1e3d83330c7de7ca9e1dc69d1630486) Remove allow Netbird traffic when reset rules - [`2e4b55b`](https://github.com/netbirdio/netbird/commit/2e4b55b49fdbfa6abad93e90fc8c612ac5426139) Skip checking rules if allow Netbird traffic chain didn't exist - [`b9c49ee`](https://github.com/netbirdio/netbird/commit/b9c49ee4563e5346f788ee447f37487859eb0939) Allow netbird traffic on windows (#1071) - [`0bfea90`](https://github.com/netbirdio/netbird/commit/0bfea903b30561e1e29ca3ba0589194f7c0c5fe8) Enable netbird traffic through uspfilter on Linux systems (#1091) - [`37d66b0`](https://github.com/netbirdio/netbird/commit/37d66b026c1393db010c12ae5b0c4f4650459a9e) decouple linux firewall check - [`3ffb1f1`](https://github.com/netbirdio/netbird/commit/3ffb1f1cb30896b09e01e4bef2035488dd98c714) Merge branch 'main' into allow-netbird-traffic - [`e87b789`](https://github.com/netbirdio/netbird/commit/e87b789becede7cb539c0c592e8753dc274bcc3b) using check fw for routemanager ### 📊 Changes **24 files changed** (+568 additions, -153 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+1 -0) 📝 `client/firewall/firewall.go` (+3 -0) 📝 `client/firewall/iptables/manager_linux.go` (+46 -18) 📝 `client/firewall/iptables/manager_linux_test.go` (+5 -3) 📝 `client/firewall/nftables/manager_linux.go` (+121 -8) ➕ `client/firewall/uspfilter/allow_netbird.go` (+19 -0) ➕ `client/firewall/uspfilter/allow_netbird_linux.go` (+21 -0) ➕ `client/firewall/uspfilter/allow_netbird_windows.go` (+91 -0) 📝 `client/firewall/uspfilter/uspfilter.go` (+9 -11) 📝 `client/firewall/uspfilter/uspfilter_test.go` (+8 -0) 📝 `client/internal/acl/manager_create.go` (+5 -0) 📝 `client/internal/acl/manager_create_linux.go` (+52 -10) 📝 `client/internal/acl/manager_test.go` (+30 -10) ➕ `client/internal/checkfw/check.go` (+3 -0) ➕ `client/internal/checkfw/check_linux.go` (+56 -0) 📝 `client/internal/routemanager/firewall_linux.go` (+15 -13) 📝 `client/internal/routemanager/firewall_nonlinux.go` (+4 -3) 📝 `client/internal/routemanager/iptables_linux.go` (+13 -19) 📝 `client/internal/routemanager/iptables_linux_test.go` (+3 -2) 📝 `client/internal/routemanager/manager.go` (+2 -2) _...and 4 more files_ </details> ### 📄 Description ## Describe your changes Enhancements to Netbird Interface Firewall Management In Windows and Linux systems, there have been scenarios where firewall restrictions hinder the traffic on the Netbird network interface. This PR addresses the issue by enhancing how we manage firewall rules for the Netbird interface. **Changes** - Introduced the `AllowNetbird` method across all Netbird firewall managers. This method is invoked by the ACL manager during initialization, ensuring traffic flow through the Netbird network interface. - For **Linux**, a default rule has been established in the "INPUT" chain of the "filter" table, allowing all incoming traffic from the Netbird network interface in booth firewall managers iptables and nftables. - For **Windows**, this PR does not include implementation. ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [x] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 03:06:18 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#14784