traffic shaping with tc and nft

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux