10. Mikrotik Limit Speed by Website and give Priority to Speedtest.net




Here is a script:

/ip firewall filter
add action=add-dst-to-address-list address-list=Youtube-List chain=forward \
    comment=Dst-Youtube-List content=googlevideo.com
add action=add-dst-to-address-list address-list=Mediafire-List chain=forward \
    comment=Mediafire.com content=mediafire.com
add action=add-dst-to-address-list address-list=Speedtest-List chain=forward \
    comment=Dst-Speedtest-List content=speedtest.net

/ip firewall mangle
add action=mark-connection chain=forward comment=Youtube.com \
    connection-state=new dst-address-list=Youtube-List new-connection-mark=\
    Youtube-conn src-address-list=Youtube-List
add action=mark-packet chain=forward connection-mark=Youtube-conn \
    new-packet-mark=Youtube-conn passthrough=no
add action=mark-connection chain=forward comment=Mediafire.com \
    connection-state=new dst-address-list=Mediafire-List new-connection-mark=\
    Mediafire-conn
add action=mark-packet chain=forward connection-mark=Mediafire-conn \
    new-packet-mark=Mediafire-conn passthrough=no
add action=mark-connection chain=forward comment=Speedtest.Net \
    connection-state=new dst-address-list=Speedtest-List new-connection-mark=\
    Speedtest-conn
add action=mark-packet chain=forward connection-mark=Speedtest-conn \
    new-packet-mark=Speedtest-conn passthrough=no

/queue simple
add max-limit=2M/2M name=LAN target=bridge-Local
add max-limit=2M/2M name=Youtube.com packet-marks=Youtube-conn parent=LAN
add max-limit=2M/2M name=Speedtest.net packet-marks=Speedtest-conn parent=LAN priority=1/1 target=""
add max-limit=512k/512k name=Mediafire.com packet-marks=Mediafire-conn \
    parent=LAN
add max-limit=1M/1M name=Other packet-marks=no-mark parent=LAN


Note: If you want to limit more website, you need to followup below three steps:

1. Add website url to firewall:
/ip firewall filter
add action=add-dst-to-address-list address-list=XXX-List chain=forward \
    comment=Dst-XXX-List content=XXX.com

2. Add  to Mangle:
/ip firewall mangle
add action=mark-connection chain=forward comment=XXX.com \
    connection-state=new dst-address-list=XXX-List new-connection-mark=\
    XXX-conn src-address-list=XXX-List

3. Add website to Queue:
/queue simple
add max-limit=2M/2M name=XXX.com packet-marks=XXX-conn parent=LAN

Previous
Next Post »

1 comments:

Write comments
CeLoOwnz
AUTHOR
April 10, 2019 at 10:15 PM delete

Great and excellent post !!!

Reply
avatar