From: pauloric@contatogs.com.br
To: netfilter <netfilter@vger.kernel.org>
Cc: pauloric <pauloric@contatogs.com.br>
Subject: nftables - quota isn't working?
Date: Thu, 12 Aug 2021 10:01:34 -0300 (BRT) [thread overview]
Message-ID: <1279582625.93.1628773294634.JavaMail.zimbra@contatogs.com.br> (raw)
Hi all
Reading https://wiki.nftables.org/wiki-nftables/index.php/Quotas
I have been testing quota but I have a doubt.
a) If I use this rule below , quota reaches its value, but download continues.
insert rule inet filter FORWARD ip daddr 192.168.10.11 quota until 2 mbytes counter accept comment "paulo-quota"
nft list ruleset | grep 'paulo-quota'
ip daddr 192.168.10.11 quota 2 mbytes used 2 mbytes counter packets 1074 bytes 2094663 accept comment "paulo-quota"
b) But if I invert logic, download stops.
insert rule inet filter FORWARD ip daddr 192.168.10.11 quota over 2 mbytes counter drop comment "paulo-quota"
debian-10.10.0-amd64-netinst.iso
https://gemmei.ftp.acc.umu.se/debian-cd/current/amd64/iso-cd/debian-10.10.0-amd64-netinst.iso
0 B/s - 22,9 MB de 336 MB
Should a) have the same result as b) ?
Ubuntu 20.04.2
5.4.0-47-generic #51-Ubuntu SMP
nftables 0.9.3-2
Thanks in advanced
--
Paulo Ricardo Bruck consultor
next reply other threads:[~2021-08-12 13:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-12 13:01 pauloric [this message]
2021-08-12 14:10 ` nftables - quota isn't working? pauloric
2021-08-12 14:20 ` Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1279582625.93.1628773294634.JavaMail.zimbra@contatogs.com.br \
--to=pauloric@contatogs.com.br \
--cc=netfilter@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.