From: "Lars Noodén" <lars.nooden@gmx.com>
To: Linux Netfilter Users List <netfilter@vger.kernel.org>
Subject: traffic shaping with tc and nft
Date: Sat, 28 May 2022 13:07:12 +0300 [thread overview]
Message-ID: <c3bc1649-d70b-ae7b-b306-0d5f2a765857@gmx.com> (raw)
Hello,
I'm working on traffic shaping with tc and have some old iptables rules
with which I've tried to use iptables-translate to convert legacy
instructions to nftables. For example, I have the following:
iptables -t mangle -A OUTPUT -p tcp --match multiport \
--sports 22,1965 -j MARK --set-mark 100
and the result is,
nft add rule ip mangle OUTPUT ip protocol tcp \
tcp sport {22,1965} counter meta mark set 0x64
However, nftables does not like that as-is and responds with an error:
"Error: Could not process rule: No such file or directory"
I've obviously missed or misinterpreted something there. What would be
the correct nft instruction(s) including any prerequisites? Or what
traffic shaping guides are there for nftables with concrete examples?
I've pored over the wiki and it is great for the aspects which have
already become familiar but it is far too abstract for me for new areas.
$ uname -sr
Linux 5.10.63-v7l+
$ apt-cache policy nftables | head -n 2
nftables:
Installed: 0.9.8-3.1
Thanks.
Lars
next reply other threads:[~2022-05-28 10:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-28 10:07 Lars Noodén [this message]
2022-05-28 10:20 ` traffic shaping with tc and nft Kamil Jońca
2022-05-28 11:21 ` Lars Noodén
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=c3bc1649-d70b-ae7b-b306-0d5f2a765857@gmx.com \
--to=lars.nooden@gmx.com \
--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.