/ip firewall layer7-protocol
add name=High regexp="^.*get.+\\.(exe|rar|iso|zip|7zip|0[0-9][1-9]|flv|mkv|avi|mp4|3gp|rmvb|mp3|img|dat|mov).*\$"
add name=Mid regexp="^.*get.+\\.(zip|rar|7z).*\$"
add name=End regexp="^.*get.+\\.(pdf|doc|docx|xlsx|xls|rtf|ppt|ppt).*\$"
add name=Video regexp="http/(0\\.9|1\\.0|1\\.1)[\\x09-\\x0d ][1-5][0-9][0-9][\\x09-\\x0d -~]*(content-type: video)"
add name=Update-an regexp="^.*get.+\\.(bin|idx|cab|gz|avc|gem|mcs|klz|dat|kdc).*\$"
add name=youtube regexp="o-o.preferred.pttelkom-|a.youtube.com|b.youtube.com|c.youtube.com|d.youtube.com|e.youtube.c om|f.youtube.com|g.youtube.com|h.youtube.com|i.youtube.com|j.youtube.com|l.youtube.com"
/ip firewall mangle
add action=mark-packet chain=forward comment="High Eks" disabled=no layer7-protocol=High new-packet-mark=High-Ext passthrough=no protocol=tcp
add action=mark-packet chain=forward comment="Mid Eks" connection-bytes=10485760-4294967295 disabled=no layer7-protocol=Mid new-packet-mark=Mid-Ext passthrough=no \
protocol=tcp
add action=mark-packet chain=forward comment="Low Eks" disabled=no layer7-protocol=High new-packet-mark=End-Ext passthrough=no protocol=tcp
add action=mark-connection chain=forward comment=Video connection-bytes=0-131072 disabled=no layer7-protocol=youtube new-connection-mark=Conn-video passthrough=yes \
protocol=tcp
add action=mark-connection chain=forward connection-bytes=131072-4294967295 disabled=no new-connection-mark=conn-videodown passthrough=yes protocol=tcp
add action=mark-packet chain=forward connection-mark=Conn-video disabled=no new-packet-mark=Video passthrough=no
add action=mark-packet chain=forward connection-mark=conn-videodown disabled=no new-packet-mark=Videolimit passthrough=no
add action=mark-packet chain=forward comment=Updatean disabled=no layer7-protocol=Update-an new-packet-mark=Update-an passthrough=no protocol=tcp
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name="Limit(Ekstensi|Streaming|Updatean)" parent=global-out priority=3
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=32k max-limit=32k name=High packet-mark=High-Ext parent="Limit(Ekstensi|Streaming|Updatean)" \
priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=32k max-limit=32k name=Mid packet-mark=Mid-Ext parent="Limit(Ekstensi|Streaming|Updatean)" priority=\
6 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=512k max-limit=1M name=End packet-mark=End-Ext parent="Limit(Ekstensi|Streaming|Updatean)" priority=\
4 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=64k max-limit=128k name=Stream-Video packet-mark=Video parent="Limit(Ekstensi|Streaming|Updatean)" \
priority=8 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=32k max-limit=32k name=Update-an packet-mark=Update-an parent="Limit(Ekstensi|Streaming|Updatean)" \
priority=5 queue=default
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=15k max-limit=32k name=Stream-VideoLimit packet-mark=Videolimit parent=\
"Limit(Ekstensi|Streaming|Updatean)" priority=8 queue=default