Skip to content

Detect which iptables to use in containers #5621

@bradfitz

Description

@bradfitz

[we have copies of this bug scattered about as comments on other bugs, so creating one tracking bug]

On Linux, when Tailscale is running in a container, we should ask the kernel directly whether iptables-legacy or iptables-nft is the right interface and use the right binary, regardless of what the "iptables" binary is a symlink to on disk.

And if the right binary is not available, fail loudly.

That is, the host environment outside of the container could be using iptables-legacy vs iptables-nft and even if the host's Debian alternatives or equivalent is correct, the container's alternatives might be wrong.

This manifests in lots of weird iptables errors.

@andrew-d has done all the hard work for this bug already. Filing this bug to cross-reference other bugs against.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions