[Bug 1696] New: "nft -s list ruleset" should include "flush ruleset" as first line

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Mon Jul 31 11:52:09 CEST 2023


https://bugzilla.netfilter.org/show_bug.cgi?id=1696

            Bug ID: 1696
           Summary: "nft -s list ruleset" should include "flush ruleset"
                    as first line
           Product: nftables
           Version: 1.0.x
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: nft
          Assignee: pablo at netfilter.org
          Reporter: apachez at gmail.com

Doing a backup using:

# nft -s list ruleset > /path/backup.nft

will often fail to restore because a first line of "flush ruleset" is missing.

Request that when doing "nft -s" that should include "flush ruleset" as the
first line of its output.

If that is not possible due to legacy or other reasons then perhaps a new
switch could be added that will include "flush ruleset" as its first line?

Such as:

# -b, --backup   Create backup of current ruleset.

Example of suggested full syntax:

# nft -b /path/backup.nft

Which then can be restored with (for example):

# nft -o -f /path/backup.nft

The above would then not bring the errors one otherwise would get if you try to
restore a nft-file created by "-s list ruleset".

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20230731/119be9e9/attachment.html>


More information about the netfilter-buglog mailing list