Skip to content

use the nft iptables backend in the image - #88

Merged
taylorsilva merged 1 commit into
concourse:masterfrom
mubashir1osmani:fix/iptables-nft
Oct 5, 2026
Merged

taylorsilva merged 1 commit into
concourse:masterfrom
mubashir1osmani:fix/iptables-nft

Conversation

@mubashir1osmani

@mubashir1osmani mubashir1osmani commented Oct 4, 2026 •

Copy link
Copy Markdown

What

Install iptables-nft and iptables-wrappers instead of iptables and ip6tables.

iproute2 still depends on the iptables package, so the legacy binaries stay in the image. iptables-wrappers owns /usr/bin/iptables and /usr/bin/ip6tables. On first use the wrapper selects the nft backend when that is the host's mode, and the legacy binaries remain available when the host is still on legacy rules.

closes concourse/concourse#9449

buult local image with iptables-nft and iptables-wrappers
Screenshot 2026-10-03 at 8 49 36 PM

Screenshot 2026-10-03 at 8 45 25 PM Screenshot 2026-10-03 at 8 46 15 PM

Why

#9449 is ip6tables (legacy) failing on ip6tables -t nat during bridge masquerade. The worker and the CNI plugins already exec those command names. They do not link Netfilter themselves. The image is what selects the legacy binary.

A rebuild of concourse/concourse:8.2.4 that deletes ip6tables and adds these two packages is already in use. I reproduced the package result on current cgr.dev/chainguard/wolfi-base with iproute2 iptables-nft iptables-wrappers:

  • iptables 1.8.13-r4 is pulled in by iproute2
  • the ip6tables package is not installed
  • /usr/bin/iptables and /usr/bin/ip6tables point at iptables-wrapper
  • iptables --version and ip6tables --version report v1.8.13 (nf_tables)
  • ip6tables -t nat -S --wait exits 0

This kernel still has the legacy nat table, so the original "table nat does not exist" crash was not reproduced here. The commands no longer resolve to the legacy binary that crash uses.

History

d256049 pinned iptables-legacy after iptables v1.8.7 (nf_tables) could not load the conntrack match (concourse-docker#86, concourse#8558). Wolfi iptables 1.8.13 ships both backends, and the wrapper chooses at runtime.

Relation to concourse/concourse#9746

That draft adds an inet concourse table through the nft binary. This image does not ship nft, so that path falls back to the legacy iptables commands and the #9449 crash remains. This package change is the fix. I am closing that draft.

Worker network setup and the CNI plugins call iptables and ip6tables.
Those packages currently point at xtables-legacy-multi, which cannot
open the nat table on nftables-only hosts (concourse/concourse#9449).

iptables-nft and iptables-wrappers point the same commands at
iptables-wrapper. The wrapper uses the nft backend when the host does,
and the legacy binaries remain installed for hosts that still use them.

Legacy was pinned after iptables 1.8.7 (nf_tables) failed to load the
conntrack match (concourse-docker#86). Wolfi iptables 1.8.13 ships both
backends. A wolfi-base install of this list reports
`iptables v1.8.13 (nf_tables)`.
@mubashir1osmani

Copy link
Copy Markdown
Author

@taylorsilva please review

@taylorsilva taylorsilva 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.

LGTM - Thanks for suggesting this package change!

@taylorsilva
taylorsilva merged commit c051767 into concourse:master Oct 5, 2026
1 check passed
@taylorsilva

Copy link
Copy Markdown
Member

Made the same change over in our CI: concourse/ci@6fec55f

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.

Migrate to netfilter (nftables)

2 participants