[PR #3249] [MERGED] Add port forwarding firewall and redirect rules #22034

Open
opened 2026-08-05 05:09:15 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/3249
Author: @lixmal
Created: 1/29/2025
Status: Merged
Merged: 1/29/2025
Merged by: @lixmal

Base: feature/port-forwarding-client-ingressHead: feature/port-forwarding-client-ingress-rules


📝 Commits (6)

  • 2c5435e Implement iptables dnat/snat rules
  • e9e1127 Add nftables
  • 69202b8 Merge branch 'feature/port-forwarding-client-ingress' into feature/port-forwarding-client-ingress-rules
  • 2ed6356 Fix map
  • dbd5360 Reduce complexity
  • 94ffafd Fix test regarding port ranges

📊 Changes

20 files changed (+599 additions, -125 deletions)

View changed files

📝 client/firewall/iptables/acl_linux.go (+10 -11)
📝 client/firewall/iptables/manager_linux.go (+10 -3)
📝 client/firewall/iptables/router_linux.go (+190 -48)
📝 client/firewall/iptables/router_linux_test.go (+10 -8)
📝 client/firewall/iptables/rule.go (+1 -1)
📝 client/firewall/manager/firewall.go (+2 -3)
📝 client/firewall/manager/forward_rule.go (+2 -4)
📝 client/firewall/nftables/acl_linux.go (+3 -3)
📝 client/firewall/nftables/manager_linux.go (+8 -5)
📝 client/firewall/nftables/router_linux.go (+325 -14)
📝 client/firewall/nftables/router_linux_test.go (+11 -7)
📝 client/firewall/nftables/rule_linux.go (+1 -1)
📝 client/firewall/uspfilter/rule.go (+1 -1)
📝 client/firewall/uspfilter/uspfilter.go (+11 -3)
📝 client/firewall/uspfilter/uspfilter_test.go (+2 -2)
📝 client/internal/acl/id/id.go (+1 -1)
📝 client/internal/acl/manager.go (+2 -2)
📝 client/internal/acl/manager_test.go (+2 -2)
📝 client/internal/ingressgw/manager.go (+5 -4)
📝 client/internal/ingressgw/manager_test.go (+2 -2)

📄 Description

Describe your changes

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/3249 **Author:** [@lixmal](https://github.com/lixmal) **Created:** 1/29/2025 **Status:** ✅ Merged **Merged:** 1/29/2025 **Merged by:** [@lixmal](https://github.com/lixmal) **Base:** `feature/port-forwarding-client-ingress` ← **Head:** `feature/port-forwarding-client-ingress-rules` --- ### 📝 Commits (6) - [`2c5435e`](https://github.com/netbirdio/netbird/commit/2c5435ef558260d34ff6a99be3cfa88cd8cceae6) Implement iptables dnat/snat rules - [`e9e1127`](https://github.com/netbirdio/netbird/commit/e9e112747a1142b3e3f78a96fe90f29be45eb5d0) Add nftables - [`69202b8`](https://github.com/netbirdio/netbird/commit/69202b8980fac4dfbb65957a728dbe4a50a778db) Merge branch 'feature/port-forwarding-client-ingress' into feature/port-forwarding-client-ingress-rules - [`2ed6356`](https://github.com/netbirdio/netbird/commit/2ed63561665732e1a350096b2077d734dbb43345) Fix map - [`dbd5360`](https://github.com/netbirdio/netbird/commit/dbd53604eb9c819b7e03ee2a8f5fa8142fb17780) Reduce complexity - [`94ffafd`](https://github.com/netbirdio/netbird/commit/94ffafdb49e2e675fbf7216ed0ca12d59972c4f6) Fix test regarding port ranges ### 📊 Changes **20 files changed** (+599 additions, -125 deletions) <details> <summary>View changed files</summary> 📝 `client/firewall/iptables/acl_linux.go` (+10 -11) 📝 `client/firewall/iptables/manager_linux.go` (+10 -3) 📝 `client/firewall/iptables/router_linux.go` (+190 -48) 📝 `client/firewall/iptables/router_linux_test.go` (+10 -8) 📝 `client/firewall/iptables/rule.go` (+1 -1) 📝 `client/firewall/manager/firewall.go` (+2 -3) 📝 `client/firewall/manager/forward_rule.go` (+2 -4) 📝 `client/firewall/nftables/acl_linux.go` (+3 -3) 📝 `client/firewall/nftables/manager_linux.go` (+8 -5) 📝 `client/firewall/nftables/router_linux.go` (+325 -14) 📝 `client/firewall/nftables/router_linux_test.go` (+11 -7) 📝 `client/firewall/nftables/rule_linux.go` (+1 -1) 📝 `client/firewall/uspfilter/rule.go` (+1 -1) 📝 `client/firewall/uspfilter/uspfilter.go` (+11 -3) 📝 `client/firewall/uspfilter/uspfilter_test.go` (+2 -2) 📝 `client/internal/acl/id/id.go` (+1 -1) 📝 `client/internal/acl/manager.go` (+2 -2) 📝 `client/internal/acl/manager_test.go` (+2 -2) 📝 `client/internal/ingressgw/manager.go` (+5 -4) 📝 `client/internal/ingressgw/manager_test.go` (+2 -2) </details> ### 📄 Description ## Describe your changes ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] 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 05:09:15 -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#22034