Settings SQM update ? online gaming COD

hello i have edit script hisham with script knomax thanks at his two for my help :slight_smile:

#copy the test in custom rules 
#begin scritp hisham is here 
$IPT -t mangle -N dscp_mark > /dev/null 2>&1
$IPT -t mangle -F dscp_mark
## check if POSTROUTING already exits then jumps to our tables if not, add them

$IPT -t mangle -L POSTROUTING -n | grep dscp_mark || $IPT -t mangle -A POSTROUTING -j dscp_mark

iptmark(){
    $IPT -t mangle -A dscp_mark "$@"
}
###########script knomax is here !!
#give a high priority for PS4 or xbox
#
## COD gets AF41  and fall in video priority with 50% threshold and mark them as AF41.
iptables -t mangle -A dscp_mark  -p udp -s 192.168.2.167 --sport 3074 --dport 30000:45000 -j DSCP --set-dscp-class AF41
iptables -t mangle -A dscp_mark  -p udp -d 192.168.2.167 --dport 3074 --sport 30000:45000 -j DSCP --set-dscp-class AF41
#
## PSN network?
iptables -t mangle -A dscp_mark  -p udp -d 192.168.2.167 -m multiport --sport 3658,3074,3478:3480,10070:10080,465,983,5223 -j DSCP --set-dscp-class AF41
iptables -t mangle -A dscp_mark  -p udp -s 192.168.2.167 -m multiport --dport 3658,3074,3478:3480,10070:10080,465,983,5223 -j DSCP --set-dscp-class AF41
iptables -t mangle -A dscp_mark  -p tcp -d 192.168.2.167 -m multiport --sport 3658,3074,3478:3480,10070:10080,465,983,5223 -j DSCP --set-dscp-class AF41
iptables -t mangle -A dscp_mark  -p tcp -s 192.168.2.167 -m multiport --dport 3658,3074,3478:3480,10070:10080,465,983,5223 -j DSCP --set-dscp-class AF41
#
#Chat psn
iptables -t mangle -A dscp_mark -p udp -m multiport --dport 9305:9309 -j DSCP --set-dscp-class CS1
iptables -t mangle -A dscp_mark -p udp -m multiport --sport 9305:9309 -j DSCP --set-dscp-class CS1
iptables -t mangle -A dscp_mark -p tcp -m multiport --dport 9305:9309 -j DSCP --set-dscp-class CS1
iptables -t mangle -A dscp_mark -p tcp -m multiport --sport 9305:9309 -j DSCP --set-dscp-class CS1
## PS4 normal
#
iptables -t mangle -A dscp_mark -s 192.168.2.167 -j DSCP --set-dscp-class AF41
iptables -t mangle -A dscp_mark -s 192.168.1.189 -j DSCP --set-dscp-class CS1
iptables -t mangle -A dscp_mark -s 192.168.1.140 -j DSCP --set-dscp-class CS1

##### re new script of hisham  
## start by washing the dscp to CS0
thne script hisham is here 


iptmark -j DSCP --set-dscp 0

iptmark -p udp -m conntrack --ctorigsrc 192.168.1.250 -j DSCP --set-dscp-class CS1 -m comment --comment "tablet udp Low"
iptmark -p tcp -m conntrack --ctorigsrc 192.168.1.250 -j DSCP --set-dscp-class CS1 -m comment --comment "tablet tcp Low"

#A robust 2 rules to detect realtime traffic

# mark connections that go over 115 packets per second, not prioritized
iptmark -p udp -m hashlimit --hashlimit-name udp_high_prio --hashlimit-above 115/sec --hashlimit-burst 50 --hashlimit-mode srcip,srcport,dstip,dstport -j CONNMARK --set-mark 0x55 -m comment --comment "connmark for udp"

# unmarked UDP streams with small packets get CS6
iptmark -p udp -m connmark ! --mark 0x55 -m multiport ! --ports 22,25,53,67,68,123,143,161,162,514,5353,80,443,8080,60001 -m connbytes --connbytes 0:940 --connbytes-dir both --connbytes-mode avgpkt -j DSCP --set-dscp-class CS6 -m comment --comment "small udp connection gets CS6"

#large udp streams like video call get AF41
iptmark -p udp -m connmark ! --mark 0x55 -m multiport ! --ports 22,25,53,67,68,123,143,161,162,514,5353,80,443,8080,60001 -m connbytes --connbytes 940:1500 --connbytes-dir both --connbytes-mode avgpkt -j DSCP --set-dscp-class AF41 -m comment --comment "large udp connection gets AF41"

########################################
# Latency Sensitive (gaming/voip)
########################################
##ICMP, to prioritize pings
iptmark -p icmp -j DSCP --set-dscp-class CS5 -m comment --comment "ICMP-pings"

#DNS traffic both udp and tcp
iptmark -p udp -m multiport --port 53,5353,8888 -j DSCP --set-dscp-class CS5 -m comment --comment "DNS udp"
iptmark -p tcp -m multiport --port 53,5353,8888 -j DSCP --set-dscp-class CS5 -m comment --comment "DNS tcp"

#NTP
iptmark -p udp -m multiport --port 123 -j DSCP --set-dscp-class CS6 -m comment --comment "NTP udp"


#High priority ipset, i use for pubgM
#iptmark ! -p tcp -m set --match-set latsens src,dst -j DSCP --set-dscp-class CS6 -m comment --comment "latency sensitive ipset" ## set dscp tag for Latency Sensitive (latsens) ipset,udp

#iptmark -p tcp -m set --match-set latsens src,dst -j DSCP --set-dscp-class CS5 -m comment --comment "latency sensitive ipset" ## set dscp tag for Latency Sensitive (latsens) ipset


########
##Browsing
########
## medium priority for browsing
iptmark -p tcp -m multiport --ports 80,443,8080 -j DSCP --set-dscp-class CS3 -m comment --comment "Browsing at CS3"

##################
#TCP SYN,ACK flows
##################
#Make sure ACK,SYN packets get priority (to avoid upload speed limiting our download speed)
iptmark -p tcp --tcp-flags ALL ACK -m length --length :128 -j DSCP --set-dscp-class CS3
iptmark -p tcp --tcp-flags ALL SYN -m length --length :666 -j DSCP --set-dscp-class CS3

#Small packet is probably interactive or flow control
iptmark -m dscp ! --dscp  24 -m dscp ! --dscp  18 -m dscp ! --dscp  34 -m dscp ! --dscp  40 -m dscp ! --dscp  48 -m length --length 0:500 -j DSCP --set-dscp-class CS3

#Small packet connections: multi purpose (don't harm since not maxed out)
iptmark -m dscp ! --dscp  24 -m dscp ! --dscp  18 -m dscp ! --dscp  34 -m dscp ! --dscp  40 -m dscp ! --dscp  48 -m connbytes --connbytes 0:250 --connbytes-dir both --connbytes-mode avgpkt -j DSCP --set-dscp-class CS3


########################################
# Streaming Media (videos/audios)
########################################
#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"


#tcpdump rule, copy and paste this rule into terminal, this rule is used to capture realtime traffic, you can change ip to what you like
#tcpdump -i br-lan host 192.168.1.126 and udp and portrange 1-65535 and !port 53 and ! port 80 and ! port 443 -vv -X -w /root/cap-name.pcap

my ip of ps4 is 192.168.2.167

Capture d’écran 2020-11-03 à 14.39.57

Capture d’écran 2020-11-03 à 14.43.56 Capture d’écran 2020-11-03 à 14.43.27

Capture d’écran 2020-11-03 à 14.45.03 Capture d’écran 2020-11-03 à 14.43.56

Capture d’écran 2020-11-03 à 14.43.27 Capture d’écran 2020-11-03 à 14.48.31 Capture d’écran 2020-11-03 à 14.48.26 Capture d’écran 2020-11-03 à 14.48.07 Capture d’écran 2020-11-03 à 14.48.01

i 'm a french user isp is dhcp vlan 832 orange france telecom

thanks everybody

Please use the "Preformatted text </>" button for logs, scripts, configs and general console output.
grafik
Please edit your post accordingly...

( remove hishams script in it's entirety... and just show is any lines that you have changed or added)

Thank you! :slight_smile:

1 Like

it' s done thanks

Your images of your settings is some confusing

whait is this problem of my settings you think ? thanks

You must use one or the other method...also in @hisham2630 script you must make changes and in dnsmasq.conf because some rules filled by dnsmasq.

1 Like

for me it's works very good in warzone call of duty battlefield modern warfare multi, so this :wink:

and the rules traffic works apparently

not your settings, but your pictures so confuse

good, when using sqm is it necessary to install any software?

what software luci-app-sqm yes :slight_smile:

Neither tc nor ipfull ?? or anything like that

tc is include to sqm scripts

and nothing else is installed? no matter how much I do tests, I can't get it to work well in call os duty

share you settings maybe you are make a fault (new thread )

config queue 'eth1'
	option qdisc 'cake'
	option script 'piece_of_cake.qos'
	option ingress_ecn 'ECN'
	option egress_ecn 'ECN'
	option itarget 'auto'
	option etarget 'auto'
	option enabled '1'
	option download '0'
	option upload '16000'
	option debug_logging '0'
	option verbosity '5'
	option qdisc_advanced '1'
	option squash_dscp '1'
	option squash_ingress '1'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'ingress'
	option eqdisc_opts 'ack-filter'
	option linklayer 'ethernet'
	option overhead '44'
	option linklayer_advanced '1'
	option tcMTU '2047'
	option tcTSIZE '128'
	option linklayer_adaptation_mechanism 'cake'
	option interface 'eth1.1074'
	option tcMPU '64'
config defaults
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'REJECT'

config zone
	option name 'lan'
	option input 'ACCEPT'
	option output 'ACCEPT'
	option forward 'ACCEPT'
	option network 'lan'

config zone
	option name 'wan'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option network 'wan'
	option family 'ipv4'

config forwarding
	option src 'lan'
	option dest 'wan'

config rule
	option name 'Allow-DHCP-Renew'
	option src 'wan'
	option proto 'udp'
	option dest_port '68'
	option target 'ACCEPT'
	option family 'ipv4'

config rule
	option name 'Allow-Ping'
	option src 'wan'
	option proto 'icmp'
	option icmp_type 'echo-request'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-IGMP'
	option src 'wan'
	option proto 'igmp'
	option family 'ipv4'
	option target 'ACCEPT'

config rule
	option name 'Allow-DHCPv6'
	option src 'wan'
	option proto 'udp'
	option src_ip 'fc00::/6'
	option dest_ip 'fc00::/6'
	option dest_port '546'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-MLD'
	option src 'wan'
	option proto 'icmp'
	option src_ip 'fe80::/10'
	list icmp_type '130/0'
	list icmp_type '131/0'
	list icmp_type '132/0'
	list icmp_type '143/0'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Input'
	option src 'wan'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	list icmp_type 'router-solicitation'
	list icmp_type 'neighbour-solicitation'
	list icmp_type 'router-advertisement'
	list icmp_type 'neighbour-advertisement'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-ICMPv6-Forward'
	option src 'wan'
	option dest '*'
	option proto 'icmp'
	list icmp_type 'echo-request'
	list icmp_type 'echo-reply'
	list icmp_type 'destination-unreachable'
	list icmp_type 'packet-too-big'
	list icmp_type 'time-exceeded'
	list icmp_type 'bad-header'
	list icmp_type 'unknown-header-type'
	option limit '1000/sec'
	option family 'ipv6'
	option target 'ACCEPT'

config rule
	option name 'Allow-IPSec-ESP'
	option src 'wan'
	option dest 'lan'
	option proto 'esp'
	option target 'ACCEPT'

config rule
	option name 'Allow-ISAKMP'
	option src 'wan'
	option dest 'lan'
	option dest_port '500'
	option proto 'udp'
	option target 'ACCEPT'

config rule
	option name 'GOOGLE MEET TRAFFIC'
	list proto 'udp'
	option src 'wan'
	option src_port '19302-19309'
	option dest '*'
	option dest_port '19302-19309'
	option target 'DSCP'
	option set_dscp 'CS4'

config rule
	option name 'WEBEX'
	list proto 'udp'
	option src 'wan'
	option src_port '9000'
	option dest_port '9000'
	option target 'DSCP'
	option set_dscp 'CS4'
	option dest '*'

config rule
	option name 'BOOST TEAMVIEWER'
	option src 'wan'
	option src_port '5938'
	option dest '*'
	option dest_port '5938'
	option target 'DSCP'
	option set_dscp 'CS4'

config rule
	option name 'COD UDP 1'
	option family 'ipv4'
	list proto 'udp'
	option src 'wan'
	option src_port '3074'
	option dest '*'
	option dest_port '30000-45000'
	option target 'DSCP'
	option set_dscp 'CS4'

config rule
	option name 'COD UDP 2'
	list proto 'udp'
	option src 'wan'
	option src_port '30000-45000'
	option dest '*'
	option dest_port '3074'
	option target 'DSCP'
	option set_dscp 'CS4'

config rule
	option name 'COD TCP 1'
	option family 'ipv4'
	list proto 'tcp'
	option src 'wan'
	option src_port '3074'
	option dest '*'
	option dest_port '50000-65000'
	option target 'DSCP'
	option set_dscp 'CS4'

config rule
	option name 'COD TCP 2'
	option family 'ipv4'
	list proto 'tcp'
	option src 'wan'
	option src_port '50000-65000'
	option dest '*'
	option dest_port '3074'
	option target 'DSCP'
	option set_dscp 'CS4'

config rule
	option name 'FIFA 20'
	option family 'ipv4'
	list proto 'udp'
	option src 'wan'
	option src_port '3659'
	option dest '*'
	option dest_port '3659'
	option target 'DSCP'
	option set_dscp 'CS4'

config rule
	option name 'FIFA UDP 3'
	option family 'ipv4'
	list proto 'udp'
	option src 'wan'
	option src_port '9999'
	option dest '*'
	option dest_port '9999'
	option target 'DSCP'
	option set_dscp 'CS4'

config rule
	option name 'FORNITE UDP 1'
	option family 'ipv4'
	option src 'wan'
	option src_port '9000-10000'
	option dest '*'
	option dest_port '50000-65000'
	option target 'DSCP'
	option set_dscp 'CS4'
	list proto 'udp'

config rule
	option name 'FORNITE UDP 2'
	option family 'ipv4'
	list proto 'udp'
	option src 'wan'
	option src_port '50000-65000'
	option dest_port '9000-10000'
	option target 'DSCP'
	option set_dscp 'CS4'
	option dest '*'

config rule
	option name 'ACK RULES COD 1'
	list proto 'tcp'
	option src 'wan'
	option src_port '80'
	option dest '*'
	option dest_port '50000-65000'
	option target 'DSCP'
	option set_dscp 'CS4'
	option family 'ipv4'
	option limit '128/second'

config rule
	option name 'ACK RULES COD 2'
	list proto 'tcp'
	option src 'wan'
	option src_port '50000-65000'
	option dest '*'
	option dest_port '80'
	option target 'DSCP'
	option set_dscp 'CS4'
	option family 'ipv4'
	option limit '128/second'

config rule
	option name 'SYN RULES COD 1'
	list proto 'tcp'
	option src 'wan'
	option src_port '443'
	option dest '*'
	option dest_port '50000-65000'
	option target 'DSCP'
	option set_dscp 'CS4'
	option family 'ipv4'
	option limit '1024/second'

config rule
	option name 'SYN RULES COD 2'
	option family 'ipv4'
	list proto 'tcp'
	option src 'wan'
	option src_port '50000-65000'
	option dest '*'
	option dest_port '443'
	option target 'DSCP'
	option set_dscp 'CS4'
	option limit '1024/second'

config rule
	option name 'ZOOM TRAFFIC '
	list proto 'udp'
	option src 'wan'
	option src_port '3478-3479 8801-8802'
	option dest '*'
	option dest_port '3478-3479 8801-8802'
	option target 'DSCP'
	option set_dscp 'CS4'

config include
	option path '/etc/firewall.user'

config include 'miniupnpd'
	option type 'script'
	option path '/usr/share/miniupnpd/firewall.include'
	option family 'any'
	option reload '1'

this is my configuration

ok i have a similar config + or -

what is your router

test dslreports

the dslreport tests give me A + on computers except on the ps4 which is grayed out. my router is a linksys wrt3200acm

ok and he your rules he out on postrouting ? and not prerouting ?