From: Pablo Neira Ayuso <pablo@netfilter.org>
To: ѽ҉ᶬḳ℠ <vtol@gmx.net>
Cc: netfilter@vger.kernel.org
Subject: Re: [nftables] netdev rate limiting | timeouts rfq
Date: Mon, 28 Sep 2020 13:52:10 +0200 [thread overview]
Message-ID: <20200928115210.GA21841@salvia> (raw)
In-Reply-To: <cd739cba-9f79-2669-b5cb-e504e851c49d@gmx.net>
On Mon, Sep 28, 2020 at 11:02:00AM +0000, ѽ҉ᶬḳ℠ wrote:
[...]
> It seems that updating a set and dropping the packet in the same rules does
> not work either, e.g.
>
> ip protocol tcp update @glv4 { ip saddr limit rate over 50/second burst 15
> packets } log prefix "foo " drop
>
> would seem to only update the named set but is neither logging nor dropping
> the frame.
This example is working fine here:
table ip x {
set glv4 {
typeof ip saddr
size 65535
flags dynamic,timeout
timeout 15m
}
chain y {
type filter hook output priority filter; policy accept;
ip protocol tcp update @glv4 { ip daddr limit rate over 1/minute burst 2 packets } log prefix "foo " drop
}
}
hping3 -S x.x.x.x -p 80 -c 1
HPING x.x.x.x (enp0s25 x.x.x.x): S set, 40 headers + 0 data bytes
len=46 ip=x.x.x.x ttl=53 DF id=0 sport=80 flags=SA seq=0 win=29200 rtt=31.8 ms
--- x.x.x.x hping statistic ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 31.8/31.8/31.8 ms
hping3 -S x.x.x.x -p 80 -c 1
HPING x.x.x.x (enp0s25 x.x.x.x): S set, 40 headers + 0 data bytes
[send_ip] sendto: Operation not permitted
[137712.162113] foo IN= OUT=enp0s25 SRC=10.141.1.219 DST=x.x.x.x LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=57787 PROTO=TCP SPT=2904 DPT=80 WINDOW=512 RES=0x00 SYN URGP=0
next prev parent reply other threads:[~2020-09-28 11:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-22 22:49 [nftables] netdev rate limiting | timeouts rfq ѽ҉ᶬḳ℠
2020-09-23 8:30 ` Pablo Neira Ayuso
2020-09-28 11:02 ` ѽ҉ᶬḳ℠
2020-09-28 11:52 ` Pablo Neira Ayuso [this message]
2020-09-28 12:08 ` ѽ҉ᶬḳ℠
2020-09-28 12:24 ` Pablo Neira Ayuso
2020-09-28 13:10 ` ѽ҉ᶬḳ℠
2020-09-28 15:43 ` Pablo Neira Ayuso
2020-09-28 16:03 ` ѽ҉ᶬḳ℠
2020-09-28 16:23 ` Pablo Neira Ayuso
2020-09-28 16:47 ` ѽ҉ᶬḳ℠
2020-09-28 17:01 ` Pablo Neira Ayuso
2020-09-28 17:38 ` ѽ҉ᶬḳ℠
2020-09-28 17:56 ` Pablo Neira Ayuso
2020-09-28 18:15 ` ѽ҉ᶬḳ℠
2020-09-28 19:19 ` ѽ҉ᶬḳ℠
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=20200928115210.GA21841@salvia \
--to=pablo@netfilter.org \
--cc=netfilter@vger.kernel.org \
--cc=vtol@gmx.net \
/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.