iptables: Enable nftables.#11027
Merged
jslobodzian merged 1 commit into3.0-devfrom Nov 23, 2024
Merged
Conversation
12 tasks
f4ba632 to
7c63db6
Compare
reubeno
reviewed
Nov 19, 2024
hbeberman
approved these changes
Nov 19, 2024
7c63db6 to
6dcdcad
Compare
reubeno
approved these changes
Nov 22, 2024
durgajagadeesh
pushed a commit
to durgajagadeesh/azurelinux_djpalli
that referenced
this pull request
Dec 31, 2024
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-staticsubpackages, etc.) have had theirReleasetag incremented../cgmanifest.json,./toolkit/scripts/toolchain/cgmanifest.json,.github/workflows/cgmanifest.json)./LICENSES-AND-NOTICES/SPECS/data/licenses.json,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)*.signatures.jsonfilessudo make go-tidy-allandsudo make go-test-coveragepassSummary
This PR enables nftables in iptables to provide iptables-nft (default) & iptables-legacy commands.
This PR fixes https://microsoft.visualstudio.com/OS/_workitems/edit/53647336.
When upgrading iptables to this variant, introduction of alternatives provides nft variant as default for iptables | ip6tables | ebtables | arptables.

The legacy iptables is installed as -legacy variant
The upgrade of iptables will start the iptables service and use the nft variant to restore the ipv4|ipv6 configs (by default the one provided as part of the package)

The equivalent nft ruleset can be seen by using
nftprovided by nftables.nft_ruleset.txt
Without reboot, the old legacy iptables tables and chains will exist. A reboot will clear the legacy iptables rules.
Adding new rules will correctly update the nft table.

A warning exists when looking at the rules list using iptables-nft (even when the legacy rules are empty):
Warning: iptables-legacy tables present, use iptables-legacy to see them
This is due to still loaded kernel modules which were loaded by the legacy iptables, namely:
iptable_filter
iptable_nat
iptable_mangle
iptable_raw
iptable_security
[and their ip6 variants]
Change Log
Does this affect the toolchain?
NO
Associated issues
Links to CVEs
Test Methodology
Pipeline build id:
Delta Dev-Build
Verified BuildImage - cvm logs to confirm iptables is installed correctly without any warnings/errors.
Buddy Build