All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lars Noodén" <lars.nooden@gmx.com>
To: netfilter@vger.kernel.org
Subject: Re: traffic shaping with tc and nft
Date: Sat, 28 May 2022 14:21:34 +0300	[thread overview]
Message-ID: <dd0cbe95-1e86-9150-cc28-649f873742d8@gmx.com> (raw)
In-Reply-To: <877d66t0v5.fsf@alfa.kjonca>

On 5/28/22 13:20, Kamil Jońca wrote:
> 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

Thanks.  I think that was it.  I had to create both the table and the
chain first.

/Lars

      reply	other threads:[~2022-05-28 11:21 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
2022-05-28 11:21   ` Lars Noodén [this message]

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=dd0cbe95-1e86-9150-cc28-649f873742d8@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.