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

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.

Let's keep iptables mode too and test the both in CI

@Akshitguptaa Akshitguptaa Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

kept iptables as a fallback.
CI runs test with both nft and iptables, and a separate one with only iptables (no nft) to cover the fallback path.

Signed-off-by: akshitguptaa <akshitguptaa29@gmail.com>
// destined to transparent-bound source IPs are delivered locally.
// The firewall rules are implemented via nft, falling back to iptables if
// nft isn't available on the host (see setupTransparentRoutingNFT and
// setupTransparentRoutingIPTables).

@AkihiroSuda AkihiroSuda Jul 26, 2026

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.

Can we have a CLI flag --source-ip-transparent-backend to explicitly set the backend?

Also, the backend should be visible in PortDriverInfo, perhaps as Extra map[string]string

See #607 for how to extend the API

@AkihiroSuda AkihiroSuda added this to the v3.1.0 milestone Jul 26, 2026
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