All of lore.kernel.org
 help / color / mirror / Atom feed
* connection tracking state in rules
@ 2024-11-12 17:56 Thomas Köller
  2024-11-12 18:21 ` Florian Westphal
  2024-11-12 18:24 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Köller @ 2024-11-12 17:56 UTC (permalink / raw)
  To: netfilter

Hi,

tried to create a rule using the conntrack state of a packet:

[root@sarkovy nftables]# cat ruleset-own.txt
create table netdev world
add set netdev world blacklist { type ipv4_addr; flags dynamic,timeout; 
timeout 1h; gc-interval 6h; size 256; }
create chain netdev world ingress { type filter hook ingress device 
"eth_cable" priority filter; policy drop; }
add rule netdev world ingress ip protocol tcp ip saddr @blacklist 
counter drop
add rule netdev world ingress ct state established,related counter accept
[root@sarkovy nftables]# nft -cf ruleset-own.txt
ruleset-own.txt:5:31-38: Error: Could not process rule: Protocol error
add rule netdev world ingress ct state established,related counter accept
                               ^^^^^^^^
This is rejected, but why?

And, btw., which one is correct, 'ct state established,related' or 'ct 
state { established,related }'?

Thomas


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

end of thread, other threads:[~2024-11-12 20:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12 17:56 connection tracking state in rules Thomas Köller
2024-11-12 18:21 ` Florian Westphal
2024-11-12 18:24 ` Pablo Neira Ayuso
2024-11-12 19:04   ` Thomas Köller
2024-11-12 20:10     ` Kerin Millar

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.