netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: George Shuklin <george.shuklin@gmail.com>
To: netfilter@vger.kernel.org
Subject: Processing nftable rules without loading them into the kernel
Date: Sun, 9 Jul 2023 11:02:48 +0300	[thread overview]
Message-ID: <431a99d3-38b6-7108-4b54-3f8620a58c6c@gmail.com> (raw)

I got a rather interesting task: I need to check if a given set of rules 
on the disk is the same as loaded into the kernel.

The main problem is that nft list is quite different from the original 
config (ordering, comments, etc), so I wonder if there is a way to make 
nft just to read rules, process them and output back in the same format 
as it is from nft ruleset list. Is there a way to force nft to just 
'process' rules to stdout without loading them into the kernel?


             reply	other threads:[~2023-07-09  8:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-09  8:02 George Shuklin [this message]
2023-07-09 15:12 ` Processing nftable rules without loading them into the kernel Eric
2023-07-10  7:39   ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=431a99d3-38b6-7108-4b54-3f8620a58c6c@gmail.com \
    --to=george.shuklin@gmail.com \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).