Skip to content

port/builtin: switch from iptables to nft for transparent routing - #613

Open
Akshitguptaa wants to merge 1 commit into
rootless-containers:masterfrom
Akshitguptaa:fix-589-nft
Open

port/builtin: switch from iptables to nft for transparent routing#613
Akshitguptaa wants to merge 1 commit into
rootless-containers:masterfrom
Akshitguptaa:fix-589-nft

Conversation

@Akshitguptaa

Copy link
Copy Markdown
Contributor

Fixes #589

Comment thread pkg/port/builtin/child/child.go
Comment thread pkg/port/builtin/child/child.go
@AkihiroSuda AkihiroSuda added this to the v3.1.0 milestone Jul 26, 2026

@AkihiroSuda AkihiroSuda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good, but let me check this again by the end of the month

@Akshitguptaa

Copy link
Copy Markdown
Contributor Author

Thanks, looks good, but let me check this again by the end of the month

One thing worth a look before then: PortDriverInfo.Extra currently reports the configured --source-ip-transparent-backend, not the runtime-selected one. Backend selection happens lazily on the first transparent connection, so Extra can say "auto" while the child is actually running iptables (or hasn't decided anything yet).

Two ways to fix it:

  1. make routing setup eager (run at init, not lazily on first connection) - smaller diff, but changes existing behavior: firewall rules get installed at startup even if source-ip-transparent is never actually used

  2. keep it lazy, make Info() a live on-demand query to the child - bigger diff, no behavior change

Which do you prefer?

@AkihiroSuda

Copy link
Copy Markdown
Member

Thanks, 1 seems better

@Akshitguptaa
Akshitguptaa force-pushed the fix-589-nft branch 2 times, most recently from 45203c8 to b2dc34d Compare August 8, 2026 23:29
@AkihiroSuda

Copy link
Copy Markdown
Member

@Akshitguptaa
Akshitguptaa force-pushed the fix-589-nft branch 9 times, most recently from 282e30e to 925f0b6 Compare August 28, 2026 21:16
Signed-off-by: akshitguptaa <akshitguptaa29@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

port/builtin: switch away from iptables to nft

2 participants