iptables user chain #2119

Open
opened 2025-11-20 07:04:10 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @AbsurdlySuspicious on GitHub (Jul 28, 2025).

Is your feature request related to a problem? Please describe.
Netbird client overrides beginning of INPUT chain (iptables-legacy) and does not allow to reliably insert rules with -i wt0 before netbird rules to harden security of peers (refer to #683) aside from netbird policies.

Describe the solution you'd like
Implement NETBIRD_INPUT_USER, NETBIRD_FORWARD_USER chains similar to DOCKER_USER chain. They should be created empty if they do not exist (and shouldn't be touched at all if they exist), and should be jumped to in first rule injected into built-in input or forward chains. User will then DROP/REJECT unwanted packets in these chains, or RETURN whitelisted packets just like in docker.

Describe alternatives you've considered

Continuously monitoring iptables rules and inserting my own on any changes. This approach is not very reliable and in worst case will create a delay before applying necessary DROP rules allowing attacker to access private services right after policies change if they manage to hack netbird management server.

Additional context
Netbird self-hosted 0.51.2

Originally created by @AbsurdlySuspicious on GitHub (Jul 28, 2025). **Is your feature request related to a problem? Please describe.** Netbird client overrides beginning of INPUT chain (iptables-legacy) and does not allow to reliably insert rules with `-i wt0` before netbird rules to harden security of peers (refer to #683) aside from netbird policies. **Describe the solution you'd like** Implement NETBIRD_INPUT_USER, NETBIRD_FORWARD_USER chains similar to DOCKER_USER chain. They should be created empty if they do not exist (and shouldn't be touched at all if they exist), and should be jumped to in first rule injected into built-in input or forward chains. User will then DROP/REJECT unwanted packets in these chains, or RETURN whitelisted packets just like in docker. **Describe alternatives you've considered** Continuously monitoring iptables rules and inserting my own on any changes. This approach is not very reliable and in worst case will create a delay before applying necessary DROP rules allowing attacker to access private services right after policies change if they manage to hack netbird management server. **Additional context** Netbird self-hosted 0.51.2
saavagebueno added the feature-request label 2025-11-20 07:04:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2119