[PR #2038] [MERGED] Enhance firewall manager checks to detect unsupported iptables #18511

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/2038
Author: @mlsmaycon
Created: 5/23/2024
Status: Merged
Merged: 5/23/2024
Merged by: @mlsmaycon

Base: mainHead: fix/use-iptables-when-older-version


📝 Commits (8)

  • 6764623 Use iptables as firewall manager when iptables version is older
  • d96b200 check if nftables can access filter chains
  • e9d6cc7 use nftables if no use iptables
  • 2375b5c run defer only if iptables was initialized
  • 8b45ea9 run defer only if iptables was initialized
  • 62dd119 add some comments and use bool
  • 1ec415d fix comparison
  • 29a429b update comparison to avoid higher minor versions

📊 Changes

1 file changed (+46 additions, -7 deletions)

View changed files

📝 client/firewall/create_linux.go (+46 -7)

📄 Description

Describe your changes

Our nftables firewall manager may cause issues when rules are created using older iptable versions

fixes #2015 and #2030

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/2038 **Author:** [@mlsmaycon](https://github.com/mlsmaycon) **Created:** 5/23/2024 **Status:** ✅ Merged **Merged:** 5/23/2024 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `fix/use-iptables-when-older-version` --- ### 📝 Commits (8) - [`6764623`](https://github.com/netbirdio/netbird/commit/6764623dbcfbd317403bb8c263fb5f5b1a469e86) Use iptables as firewall manager when iptables version is older - [`d96b200`](https://github.com/netbirdio/netbird/commit/d96b200897db757a40b2a3a672a00ceb8ac0a33c) check if nftables can access filter chains - [`e9d6cc7`](https://github.com/netbirdio/netbird/commit/e9d6cc760b229643988658b7f4847ff99fc34940) use nftables if no use iptables - [`2375b5c`](https://github.com/netbirdio/netbird/commit/2375b5c0e869a26cf572e7cd54c52be2a28fa050) run defer only if iptables was initialized - [`8b45ea9`](https://github.com/netbirdio/netbird/commit/8b45ea9eb5619055d08a34990e947b019e06488d) run defer only if iptables was initialized - [`62dd119`](https://github.com/netbirdio/netbird/commit/62dd119efbc7ab7645395191a3af3e60e43f1537) add some comments and use bool - [`1ec415d`](https://github.com/netbirdio/netbird/commit/1ec415dc54a679d5849c0dc7d0a76079826cd533) fix comparison - [`29a429b`](https://github.com/netbirdio/netbird/commit/29a429b59a4a1f89f5a2abadd4aec0f8af9eb107) update comparison to avoid higher minor versions ### 📊 Changes **1 file changed** (+46 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `client/firewall/create_linux.go` (+46 -7) </details> ### 📄 Description ## Describe your changes Our nftables firewall manager may cause issues when rules are created using older iptable versions ## Issue ticket number and link fixes #2015 and #2030 ### Checklist - [x] 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 --- <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 04:08:35 -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#18511