Linux Netfilter discussions
 help / color / mirror / Atom feed
* Is viewing a "candidate" ruleset in 'nft list ruleset' format possible?
@ 2020-04-19  2:12 Martin Gignac
  2020-04-22  4:51 ` Trent W. Buck
  0 siblings, 1 reply; 8+ messages in thread
From: Martin Gignac @ 2020-04-19  2:12 UTC (permalink / raw)
  To: netfilter

Hi,

I'd like to know if it's possible tell 'nft' to load a ruleset from
file *without* applying it (a la 'nft -c -f <ruleset>) *but* also have
it show the parsed (yet unapplied) ruleset in 'nft list ruleset'
format as well?

I ask because I have a Bash script with a few helper functions for
nftables and one of the things I'd like to be able to do is to perform
a diff between a candidate ruleset and the last applied/current
ruleset. I can already do this by diffing the ruleset from file with
the last previously saved ruleset from file, but I'd like to be able
to (instead) compare the ruleset using the "cleaned up" format from
'nft list ruleset'. I just don't know how to generate a "candidate"
ruleset in that format without applying it to the kernel first (and
then it's not longer a "candidate", obviously).

Hopefully my question makes sense.

Thanks,
-Martin

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-04-30  8:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-19  2:12 Is viewing a "candidate" ruleset in 'nft list ruleset' format possible? Martin Gignac
2020-04-22  4:51 ` Trent W. Buck
2020-04-22 16:34   ` Martin Gignac
2020-04-23  2:06     ` Duncan Roe
2020-04-23 12:10       ` Martin Gignac
2020-04-30  3:25       ` Trent W. Buck
2020-04-30  8:05         ` Trent W. Buck
2020-04-30  3:10     ` Trent W. Buck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox