limit speed for specific website

dear all
i have alot of users of facebook and you tube
i want to limit speed for these sites
how can i do this?

Hello
i think best way for limit your client in this sites is that you add address-list for ip address of this site or use “content” add add sites with content facebook or youtube and dynamicly add dst-address of this packets to an address list and then create a queue for this address-list my example:

/ip firewall filter add chain=forward content=facebook.com action=add-dst-to-address-list address-list=limitedsites address-list-timeout=5m
/ip firewall mangle add chain=forward dst-address-list=limitedsites action=mark-connection new-connection-mark=li-si-connection passthrough=yes
/ip firewall mangle add chain=forward connection-mark=li-si-connection action=mark-packet new-packet-mark=li-si-packets passthrough=no
/queue simple add packet-marks=li-si-packets max-limit=64k/64k

Good luck

Hi,

Weirdly looking for the exact same thing, will test out your solution tonight to see if it works!

Hassibi, seems your solution doesn’t work.

Not end of the world, I put something else together that works. For anyone who might be looking for something like this in the future :slight_smile:

…/ip firewall layer7-protocol
add comment=“” name=facebook regexp=“facebook|fbcdn.net

…/ip firewall mangle
add action=mark-packet chain=prerouting
comment=“Mark Packet Facebook” disabled=no
layer7-protocol=facebook new-packet-mark=facebook
passthrough=no

…/queue tree add name=“Facebook” parent=global
packet-mark=facebook limit-at=0 queue=default
priority=8 max-limit=64k burst-limit=0
burst-threshold=0 burst-time=0s

Hi, but this queue is total, right? I mean, this is max limit 64k for all users, not for each user… then the speed will be a lot slow… Any way to make it for all users (64k of this example) for each user (for facebook).

Regards!!

Thanks for sharing this code. I try this for testing. Can I replace the value 64k/64k to 2Mb/10Mb in this script

hallo to alls please comment about this code Related Facebook Full speed bypass user profile

/ip firewall layer7-protocol
add comment=Browsing name=Browsing regexp=\
"\\.(xml)|\\.(php)|\\.(css)|\\.(js)\r\
\n^.*get.+\\.facebook.*\$"
add comment=photos name=photos regexp=\
"\\.(jpg)|\\.(gif)|\\.(ico)|\\.(jpeg)|\\.(png)|\\.(bmp)"

/ip firewall mangle
add action=mark-connection chain=prerouting comment=Browsing layer7-protocol=\
Browsing new-connection-mark=Browsing
add action=mark-packet chain=prerouting comment=Browsing connection-mark=\
Browsing new-packet-mark=Browsing passthrough=no
add action=mark-connection chain=prerouting comment=photos layer7-protocol=\
photos new-connection-mark=photos
add action=mark-packet chain=prerouting comment=photos layer7-protocol=photos \
new-packet-mark=photos

/queue tree
add comment=Browsing name=Browsing packet-mark=Browsing parent=global \
priority=1 queue=default
add comment=photos name=photos packet-mark=photos parent=global priority=1 \
queue=default

Exactly, does anyone know how we can limit the speed for each user?