Friday, 20 May 2016

Limited Bandwidth ¨iso¨,¨zip¨,¨rar¨,¨pdf¨,¨mp3¨,¨exe¨,¨bin¨,¨7z¨

/ip firewall layer7-protocol
add name=EXE regexp="\\.(exe)"
add name=RAR regexp="\\.(rar)"
add name=ZIP regexp="\\.(zip)"
add name=7Z regexp="\\.(7z)"
add name=PDF regexp="\\.(pdf)"
add name=MP3 regexp="\\.(mp3)"
add name=ISO regexp="\\.(iso)"
add name=BIN regexp="\\.(bin)"
/ip firewall mangle
add action=mark-packet chain=prerouting comment=7z layer7-protocol=7Z \
    new-packet-mark=7z-mark protocol=tcp
add action=mark-packet chain=prerouting comment=bin layer7-protocol=BIN \
    new-packet-mark=bin-mark protocol=tcp
add action=mark-packet chain=prerouting comment=iso layer7-protocol=ISO \
    new-packet-mark=iso-mark protocol=tcp
add action=mark-packet chain=prerouting comment=exe layer7-protocol=EXE \
    new-packet-mark=exe-mark protocol=tcp
add action=mark-packet chain=prerouting comment=mp3 layer7-protocol=MP3 \
    new-packet-mark=mp3-mark protocol=tcp
add action=mark-packet chain=prerouting comment=pdf layer7-protocol=PDF \
    new-packet-mark=pdf-mark protocol=tcp
add action=mark-packet chain=prerouting comment=rar layer7-protocol=RAR \
    new-packet-mark=rar-mark protocol=tcp
add action=mark-packet chain=prerouting comment=zip layer7-protocol=ZIP \
    new-packet-mark=zip-mark protocol=tcp
/queue tree
add comment="1M For All Users By HAMZA KHALIL" max-limit=1M name=\
    "Total Bandwidth" parent=global queue=default
add name=PDF packet-mark=pdf-mark parent="Total Bandwidth" queue=default
add name=RAR packet-mark=rar-mark parent="Total Bandwidth" queue=default
add name=ISO packet-mark=iso-mark parent="Total Bandwidth" queue=default
add name=MP3 packet-mark=mp3-mark parent="Total Bandwidth" queue=default
add name=EXE packet-mark=exe-mark parent="Total Bandwidth" queue=default
add name=BIN packet-mark=bin-mark parent="Total Bandwidth" queue=default
add name=7Z packet-mark=7z-mark parent="Total Bandwidth" queue=default
add name=ZIP packet-mark=zip-mark parent="Total Bandwidth" queue=default

No comments:

Post a Comment