Attach conntrack helpers via ct helper objects #25

Merged
benvin merged 2 commits from benvin/ct-helpers into main 2026-10-04 14:17:24 +11:00
Member

Shorewall CT:helper:<name> conntrack entries are migrated but never compiled, so FTP/SIP/TFTP and other ALG helpers are never attached.

  • declare a ct helper object per helper/proto, diffed in plan/apply and recreated in order on snapshot restore
  • attach with ct helper set rules in helper_prerouting/helper_output chains at mangle priority (after conntrack)
  • scope by source/dest zones with the same rules as notrack/drop entries; honour :P/:O (default both), proto and ports; default proto per known helper
  • ignore kernel-narrowed l3proto (pptp is IPv4-only) when diffing
Shorewall `CT:helper:<name>` conntrack entries are migrated but never compiled, so FTP/SIP/TFTP and other ALG helpers are never attached. - declare a `ct helper` object per helper/proto, diffed in plan/apply and recreated in order on snapshot restore - attach with `ct helper set` rules in `helper_prerouting`/`helper_output` chains at mangle priority (after conntrack) - scope by source/dest zones with the same rules as notrack/drop entries; honour `:P`/`:O` (default both), proto and ports; default proto per known helper - ignore kernel-narrowed l3proto (pptp is IPv4-only) when diffing
unkin-agent added 1 commit 2026-10-03 23:50:40 +10:00
Attach conntrack helpers via ct helper objects
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
c557c4b78a
Author
Member
  • nit: internal/nftables/compiler.go:225 — ct.User (valid on output-chain helper rules) is silently dropped, so the helper is attached for all users with no warning (Source/Dest do warn) → include ct.User in the unsupported-scoping warning, or reject it for helper rules.
- nit: internal/nftables/compiler.go:225 — `ct.User` (valid on output-chain helper rules) is silently dropped, so the helper is attached for all users with no warning (Source/Dest do warn) → include `ct.User` in the unsupported-scoping warning, or reject it for helper rules.
unkin-agent added 1 commit 2026-10-04 13:58:27 +11:00
Merge remote-tracking branch 'origin/main' into benvin/ct-helpers
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
b85ba61fe6
# Conflicts:
#	internal/nftables/compiler.go
#	internal/nftables/compiler_test.go
#	internal/nftables/engine.go
Author
Member

No findings.

No findings.
benvin merged commit b849626a8c into main 2026-10-04 14:17:24 +11:00
benvin deleted branch benvin/ct-helpers 2026-10-04 14:17:24 +11:00
Sign in to join this conversation.