Re: [nft PATCH] List handles of added rules if requested

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 05, 2017 at 11:18:37AM +0000, Puustinen, Ismo wrote:
> On Fri, 2017-05-05 at 12:49 +0200, Pablo Neira Ayuso wrote:
> > This does not integrate at all into the scripting features we have in
> > 
> > nftables. We don't want people to use bash (or like) shell scripts
> > anymore, they are bad, they break atomicity for us. We should extend
> > native nftables scripting capabilities to support what user need,
> > natively. Look, this will not work with nft -i either...
> > 
> > And this also will not work for robots using incremental updates via
> > nft -f. And we very much want to support such transaction like
> > scheme,
> > ie. place a bunch of incremental updates in one single file and apply
> > that in one single transaction.
> > 
> > This is just covering one very specific usecase, that is, users have
> > a
> > quick way to delete the rule that just added. And we have better ways
> > to achieve this, and that will work from all the scenarios that I
> > described above.
> 
> I would be interested in any documentation you might have concerning
> the "better ways" of creating modular rulesets, that is, automatically
> adding and deleting rules and rule groups. This is a real issue that
> I'm currently struggling with.
> 
> My use case is  pretty simple: when a service is loaded, it also loads
> the firewall rules associated with it. When a service is stopped, the
> rules corresponding to the service are unloaded. There is no
> interactive user present in the system.

Would it be better if you do this programmatically? ie. from a
library. Do you have some example code of how you're doing things
there?

> Having "nft add rule ..." return a rule handle would fix this, so I was
> happy to see Phil's patches.

But this is basically pushing nft to the domain of using non-native
shell scripts.

I guess you call several commands there in a row and that is defeating
the existing commit protocol we have.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux