#4840 cfgmgmt firewall (iptables): rule placement with before, after and first
Opened by stack72 · 11/17/2026· Shipped 11/20/2026
Follow-up to #4334, which added before, after and first rule placement to the @swamp/cfgmgmt firewall model on the ufw backend only. The iptables backend refuses those fields today: it always appends with iptables -A, and check does not look at rule order. iptables evaluates rules in chain order, the same ordering problem ufw has, so the same inputs could be supported there: read positions from iptables -S line order, insert with iptables -I CHAIN N, and repair a misplaced rule by delete then insert with the same restore-on-failure handling. Anchoring by comment works on iptables via the comment match. Note that the iptables backend handles IPv4 only (no ip6tables).
Shipped
Click a lifecycle step above to view its details.
system commented 11/17/2026, 5:04:02 PM
Classified automatically when this issue was filed.
- Source: Extensions
If you feel this classification is incorrect, add a ripple to tell us so.
Sign in to post a ripple.