mangle http traffic

Good Day,

I have followed Janis ip mangle example and rules and modify it to target port 80 only the goal is when LAN users downloaded/uploaded more than 2Mb his connection will be throttle.

I am unsure if the rules work after my modification. If anyone got a chance, please kindly give some tips.


The following are the rules.


0 ;;; mark all new connections
chain=forward protocol=tcp dst-port=80 action=mark-connection new-connection-mark=new_conn passthrough=yes

1 ;;; mark packets
chain=forward protocol=tcp dst-port=80 connection-mark=new_conn connection-bytes=0-2000000 action=mark-packet new-packet-mark=new_packet passthrough=no

2 ;;; marking old packets
chain=forward protocol=tcp dst-port=80 connection-mark=new_conn action=mark-packet new-packet-mark=old_packets passthrough=no

queue

5 name=“PCQ_Upload” kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=src-port pcq-total-limit=2000

6 name=“PCQ_Download” kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=dst-port pcq-total-limit=2000

0 name=“Main_Upload” parent=public packet-mark=“” limit-at=0 queue=default priority=8 max-limit=1000000 burst-limit=0 burst-threshold=0 burst-time=0s

1 name=“Up First 2Mbyte” parent=Main_Upload packet-mark=new_packet limit-at=128000 queue=PCQ_Upload priority=1 max-limit=1000000 burst-limit=0
burst-threshold=0 burst-time=0s

2 name=“Up Rest Mbytes” parent=Main_Upload packet-mark=old_packets limit-at=64000 queue=PCQ_Upload priority=8 max-limit=1000000 burst-limit=0
burst-threshold=0 burst-time=0s

3 name=“Main_Download” parent=lan packet-mark=“” limit-at=0 queue=default priority=8 max-limit=1000000 burst-limit=0 burst-threshold=0 burst-time=0s

4 name=“Down First 2Mbyte” parent=Main_Download packet-mark=new_packet limit-at=128000 queue=PCQ_Download priority=1 max-limit=1000000 burst-limit=0
burst-threshold=0 burst-time=0s

5 name=“Down Rest Mbytes” parent=Main_Download packet-mark=old_packets limit-at=64000 queue=PCQ_Download priority=8 max-limit=1000000 burst-limit=0
burst-threshold=0 burst-time=0s