All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kamil Jońca" <kjonca@op.pl>
To: netfilter@vger.kernel.org
Subject: Re: traffic shaping with tc and nft
Date: Sat, 28 May 2022 12:20:14 +0200	[thread overview]
Message-ID: <877d66t0v5.fsf@alfa.kjonca> (raw)
In-Reply-To: <c3bc1649-d70b-ae7b-b306-0d5f2a765857@gmx.com> ("Lars Noodén"'s message of "Sat, 28 May 2022 13:07:12 +0300")

Lars Noodén <lars.nooden@gmx.com> writes:

> 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

Blind shot: in nftables you have no OUTPUT chain by default so I suspect
you have to create it manually.

nft add chain ip mangle  OUTPUT ...

KJ


-- 
http://wolnelektury.pl/wesprzyj/teraz/

  reply	other threads:[~2022-05-28 10:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-28 10:07 traffic shaping with tc and nft Lars Noodén
2022-05-28 10:20 ` Kamil Jońca [this message]
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=877d66t0v5.fsf@alfa.kjonca \
    --to=kjonca@op.pl \
    --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.