[PR #5621] [client] Make raw table initialization non-fatal in firewall managers #23468

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

Original Pull Request: https://github.com/netbirdio/netbird/pull/5621

State: closed
Merged: Yes


Describe your changes

  • Make iptables/nftables raw table (notrack chain) initialization non-fatal during firewall Init()
  • Systems without iptable_raw or raw priority support now log a warning instead of failing the entire firewall manager
  • Add rawSupported guard to iptables so SetupEBPFProxyNoTrack and cleanup are skipped when raw is unavailable

The raw table is only used for eBPF proxy notrack rules, not core firewall functionality. The engine already handles SetupEBPFProxyNoTrack errors as non-fatal warnings, so blocking init on it was unnecessarily strict.

Fixes #5551

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)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (internal error handling change, no user-facing behavior difference)

Summary by CodeRabbit

  • Bug Fixes

    • Firewall initialization no longer fails if notrack chain setup is unavailable; a warning is logged and core firewall functionality continues.
  • Behavior Change

    • The system now detects raw-table notrack support; features that require raw notrack are skipped and return an error when unsupported, preventing unsafe operations.
    • Cleanup and setup flows now respect the detected support state to avoid spurious errors.
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/5621 **State:** closed **Merged:** Yes --- ## Describe your changes - Make iptables/nftables raw table (notrack chain) initialization non-fatal during firewall `Init()` - Systems without `iptable_raw` or raw priority support now log a warning instead of failing the entire firewall manager - Add `rawSupported` guard to iptables so `SetupEBPFProxyNoTrack` and cleanup are skipped when raw is unavailable The raw table is only used for eBPF proxy notrack rules, not core firewall functionality. The engine already handles `SetupEBPFProxyNoTrack` errors as non-fatal warnings, so blocking init on it was unnecessarily strict. ## Issue ticket number and link Fixes #5551 ## 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) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (internal error handling change, no user-facing behavior difference) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Firewall initialization no longer fails if notrack chain setup is unavailable; a warning is logged and core firewall functionality continues. * **Behavior Change** * The system now detects raw-table notrack support; features that require raw notrack are skipped and return an error when unsupported, preventing unsafe operations. * Cleanup and setup flows now respect the detected support state to avoid spurious errors. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
saavagebueno added the pull-request label 2026-08-05 06:07: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#23468