public inbox for netfilter@vger.kernel.org
 help / color / mirror / Atom feed
* set with limit
@ 2024-11-19 12:03 Slavko
  2024-11-19 16:06 ` Florian Westphal
  0 siblings, 1 reply; 5+ messages in thread
From: Slavko @ 2024-11-19 12:03 UTC (permalink / raw)
  To: netfilter

Hi,

with nft v1.0.6 and kernel 5.10.226 i want to limit logging count
by IP. I setup set:

     set log_base4 {
         typeof ip saddr
         size 1000
         flags dynamic,timeout
         limit rate 1/minute burst 2 packets
         timeout 1h
         comment "IPv4 base log limit"
     }

It is then used in chain:

     chain input {
         type filter hook input priority filter + 5; policy accept;
         ...
         update @log_base4 { ip saddr } log group 0
     }

I see, that set is filled/updated by particular IP:

     elements = { X.Y.Z.W timeout 1h expires 59m59s360ms }

But i see 15 lines per minute (it sends packet every 4 sec) for that
IP. I expect max 2 lines per minute...

Please what i did wrong?

-- 
Slavko
https://www.slavino.sk/

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

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

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-19 12:03 set with limit Slavko
2024-11-19 16:06 ` Florian Westphal
2024-11-19 18:00   ` Slavko
2024-11-20  8:17     ` Slavko
2024-11-20 21:49       ` Pablo Neira Ayuso

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