firecracker-microvm / firecracker

Secure and fast microVMs for serverless computing.
http://firecracker-microvm.io
Apache License 2.0
26.12k stars 1.81k forks source link

[Feature Request] Migrate networking documentation to nftables #4874

Open kanpov opened 1 week ago

kanpov commented 1 week ago

Feature Request

The backing kernel module for iptables (x_tables) is extremely not recommended by the Linux netfilter team, so the iptables command now on most distros is deprecated and only the nft command is recommended that uses the new nftables kernel module, plus the iptables-nft command is also available that uses the legacy iptables syntax and converts it to then call nft.

As such, it's important to update Firecracker's networking documentation to use nftables.

Describe the desired solution

Update the following docs:

Describe possible alternatives

The least-effort path but also a pretty bad one is to replace iptables with iptables-nft in the examples.

Additional context

I'm currently performing a large refactor of fcnet, which is a Rust-based Firecracker networking backend, and porting it from iptables CLI calls to nftables via libnftables-json, so as soon as I complete that and figure out all the nft calls necessary, I'll contribute these doc changes to Firecracker .

Checks

kanpov commented 1 week ago

An additional goal might be to migrate integration tests via the python-nftables thing (I think that's what it's called), but that call imo is up to the integration test maintainers and not me.

kanpov commented 1 week ago

I forgot getting-started also uses iptables for its networking (and with some even more obscure commands than the current network-setup), so that should also fall into scope of a second PR.