Iptmark traffic

Hi there I am attmpting to use the iptmark command to traffic shape using SQM however at present my installation doesn't have this command, I have install kmod-ipt-ipmark however this still has not provided the iptmark command

Any one know what packages should be installed for this to work?

Current router devices is
Model
Linksys WRT3200ACM

Architecture
ARMv7 Processor rev 1 (v7l)

Firmware Version
OpenWrt 19.07.4 r11208-ce6496d796 / LuCI openwrt-19.07 branch git-20.247.75781-0d0ab01

  • I'm just curious, how did you verify that?
  • Did you reboot after installing the package?

Yes I have reboot after installation of the package sadly this command still is not present

Command...?

Can you show the command you're using, please?

Sure i am trying to run the following

#!/bin/sh
 ########################################
#Known video streams sites like netflix
iptmark -m set --match-set streaming src,dst -j DSCP --set-dscp-class AF41 -m comment --comment "video audio stream ipset"

# some iptv provider's use this port
iptmark -p tcp -m multiport --ports 1935,9982 -j DSCP --set-dscp-class AF41 -m comment --comment "some iptv streaming service"

#known usrcdn like google or akamai

iptmark -m set --match-set usrcdn src,dst -j DSCP --set-dscp-class AF21 -m comment --comment "usrcdn ipset"

#########################################
# Background Traffic (Bulk/file transfer)
#########################################
#bulk traffic ipset, like windows udates and steam updates/downloads
iptmark -p tcp -m set --match-set bulk src,dst -j DSCP --set-dscp-class CS1 -m comment --comment "bulk traffic ipset"
iptmark -p udp -m set --match-set bulk src,dst -j DSCP --set-dscp-class CS1 -m comment --comment "bulk traffic ipset"
iptmark -p tcp -m connbytes --connbytes 350000: --connbytes-dir both --connbytes-mode bytes -m dscp --dscp-class CS0 -j DSCP --set-dscp-class CS1 -m comment --comment "Downgrade CS0 to CS1 for bulk tcp traffic"
iptmark -p tcp -m connbytes --connbytes 350000: --connbytes-dir both --connbytes-mode bytes -m dscp --dscp-class CS3 -j DSCP --set-dscp-class CS1 -m comment --comment "Downgrade CS3 to CS1 for bulk tcp traffic"
iptmark -p udp -m multiport --port 60001 -j DSCP --set-dscp-class CS1 -m comment --comment "bulk torrent port UDP"

There is no such command. See this link to properly use ipmark with the firewall: https://linux.die.net/man/8/iptables

Further, you should be able to add these rules to the UCI with the "Extra arguments" parameter. Hope this help.

1 Like

You are correct! I was not seeing the obvious in front of me as it's an abbreviation and that copy of the script was missing setting this. Problem solved thank you.

1 Like

If the abbreviation was ipt - some distros link that to iptables.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.