All of lore.kernel.org
 help / color / mirror / Atom feed
* nftables expressions and operators
@ 2023-11-06 13:11 Aurel Wisse
  2023-11-06 13:28 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 5+ messages in thread
From: Aurel Wisse @ 2023-11-06 13:11 UTC (permalink / raw)
  To: netfilter

Hi,

I am starting to learn nftables (only superficial previous experience with iptables) and I can't find certain syntax rules for expressions and operators in the wiki or the man page.

I am learning by listing the rulesets of certain predefined firewalls (fw4/OpenWRT, UFW) and I notice that certain listed rules contain operators which I can guess (hopefully correctly) from context and the original syntax in the imported file, but I would like to be sure in order not to make mistakes while building my own firewall.

Examples:

tcp flags & (fin|syn|rst|ack) != syn jump syn_flood

becomes

tcp flags syn / fin,syn,rst,ack jump syn_flood 

So, from context, commas without spaces around them are equivalent to logical or with precedence over "/", and "/" is somehow "!=" ?? . Where did the & (logical AND?) operator go?

This is just one example. I would like to learn the full operator syntax rules in nftables. Any ideas where I should look ? Do I have to dig into the source code ?

Thanks

Aurel

nftables v1.0.2 (Lester Gooch)
Pop-OS (6.5.6-76060506-generic)

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

end of thread, other threads:[~2023-11-06 15:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-06 13:11 nftables expressions and operators Aurel Wisse
2023-11-06 13:28 ` Pablo Neira Ayuso
2023-11-06 14:24   ` Aurel Wisse
2023-11-06 15:28     ` Eric
2023-11-06 15:41       ` Aurel Wisse

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.