9. Mikrotik Unlimit Browsing but Limit Download




Here is a script:

/ip firewall mangle
add action=mark-connection chain=prerouting connection-bytes=\
    262146-4294967295 in-interface=ether1 new-connection-mark=download \
    protocol=tcp src-port=21,80
add action=mark-packet chain=prerouting connection-mark=download \
    in-interface=ether1 new-packet-mark=download passthrough=no

/queue type
add kind=pcq name=shape pcq-classifier=src-address pcq-dst-address6-mask=64 \
    pcq-rate=128k pcq-src-address6-mask=64

/queue tree
add max-limit=128k name=Download packet-mark=download parent=global queue=\
    shape 

Not: ether1 = WAN interface

if you have two ISP and configure as load Balancing, you must add two Mangle

Ex.
/ip firewall mangle
add action=mark-connection chain=prerouting connection-bytes=\
    262146-4294967295 in-interface=ether1 new-connection-mark=download \
    protocol=tcp src-port=21,80
add action=mark-packet chain=prerouting connection-mark=download \
    in-interface=ether1 new-packet-mark=download passthrough=no

/ip firewall mangle
add action=mark-connection chain=prerouting connection-bytes=\
    262146-4294967295 in-interface=ether2 new-connection-mark=download \
    protocol=tcp src-port=21,80
add action=mark-packet chain=prerouting connection-mark=download \
    in-interface=ether1 new-packet-mark=download passthrough=no

Previous
Next Post »

5 comments

Write comments
January 26, 2017 at 3:49 PM delete

Your website very good
You are best in Mikrotik settings

Reply
avatar
Unknown
AUTHOR
November 12, 2017 at 12:28 AM delete

seems2 be good, but why there is upper limit 4.29gb per connecton? if some more where is "heavy" mangle rule and corresponding queue?

Reply
avatar
Unknown
AUTHOR
December 20, 2017 at 4:04 PM delete

សួរស្ដីលោក គ្រូ តើលោកគ្រូមានបើក វគ្កសិក្សា ពី Mikrotik អត់

Reply
avatar
Unknown
AUTHOR
January 7, 2018 at 1:42 AM delete

Thanks Dear, It worked for me. Thanks one more time for sharing your idea

Reply
avatar
Velo Big
AUTHOR
February 25, 2019 at 8:46 PM delete

Hi thanks for help but nowadays dowloan link use also 443 not 80 so could u update script if possible.

Thanks

Reply
avatar