Saturday, February 25, 2017

112. Mikrotik Limit Speed Facebook



You can contact me: plus.google.com/+PhallaCCMT; youtube.com/phallaccmt; facebook.com/Phalla.CCMT; twitter.com/PhallaCCMT and Phalla.CCMT@gmail.com

Script:

/ip firewall layer7-protocol
add name=L7_FB regexp="^(.*)(facebook)(.*)\\\$"

/ip firewall filter
add action=add-dst-to-address-list address-list=FB_List address-list-timeout=\
    5m chain=forward layer7-protocol=L7_FB log-prefix=""

/ip firewall mangle
add action=mark-connection chain=forward dst-address-list=FB_List log-prefix=\
    "" new-connection-mark=FB_Conn passthrough=yes

add action=mark-packet chain=forward connection-mark=FB_Conn log-prefix="" \
    new-packet-mark=FB_Pkt passthrough=no

/queue simple
add max-limit=128k/128k name=Facebook packet-marks=FB_Pkt target=""
add max-limit=5M/5M name=All_LAN packet-marks=no-mark target=""


6 comments:

  1. thank you sir it worked for me.

    ReplyDelete
  2. Good, please research and sharing your more knowledge.
    Thanks

    ReplyDelete
  3. When user is logged in facebook will use HTTPS, meaning that L7 will not be able to match this traffic. Only unencrypted HTTP can be matched.

    ReplyDelete
  4. i use your :
    http://phallaccmt.blogspot.com/2016/01/mikrotik-limit-youtube-and-all-download_31.html this code its working good.
    Today I add this for facebook limitation : http://phallaccmt.blogspot.com/2017/02/112-mikrotik-limit-speed-facebook.html
    Both are them working good. But unfortunately i notice when facebook limitation is enable then its effect on youtube download too. And after when i disable the facebook limitation youtube download as usual speed.

    ReplyDelete
  5. if ever i limit other site shoud i change the this:
    /ip firewall layer7-protocol
    add name=L7_FB regexp="^(.*)(twitter)(.*)\\\$"

    ReplyDelete
  6. what if we are using ppoe server settings

    ReplyDelete