Community discussions

MikroTik App
 
amit22004
just joined
Topic Author
Posts: 3
Joined: Sun Sep 11, 2011 3:00 pm
Contact:

Download limit for websites like youtube, rapidshare etc.

Sun Sep 11, 2011 3:14 pm

I am using pppoe on Mikrotik 3.20.
I want limit speed for Youtube, rapidshare or all possible websites.
can anybody can help me to do this.
I tried so many rules in mangle and queues but I am not able to limit.


:( :( :(
 
heleopless
Frequent Visitor
Frequent Visitor
Posts: 78
Joined: Mon Jan 03, 2011 3:03 pm

Re: Download limit for websites like youtube, rapidshare etc

Mon Sep 12, 2011 9:57 pm

try this
this ill help you limit youtube download

/ip firewall layer7-protocol
add comment="" name="YouTube Download" regexp=videoplayback

add action=mark-connection chain=prerouting comment="youtube DOWNS" disabled=no layer7-protocol="YouTube Download" new-connection-mark="youtube DOWNS" passthrough=yes protocol=tcp
add action=mark-packet chain=postrouting comment="" connection-mark="youtube DOWNS" disabled=no new-packet-mark=youtube passthrough=no protocol=tcp


/queue type
set default-small kind=pcq name=default-small pcq-classifier=src-address,dst-address,src-port,dst-port pcq-limit=50 pcq-rate=0 pcq-total-limit=2000

/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=512K name=queue1 packet-mark=youtube parent=global-out priority=8 queue=default-small



in this code it is limited by 512k you can change it to what you want
 
nazzeem
just joined
Posts: 11
Joined: Tue May 10, 2011 8:07 am

Re: Download limit for websites like youtube, rapidshare etc

Thu Oct 25, 2012 10:25 am

Does this work? How does it know the bandwidth used comes from Youtube?
try this
this ill help you limit youtube download

/ip firewall layer7-protocol
add comment="" name="YouTube Download" regexp=videoplayback

add action=mark-connection chain=prerouting comment="youtube DOWNS" disabled=no layer7-protocol="YouTube Download" new-connection-mark="youtube DOWNS" passthrough=yes protocol=tcp
add action=mark-packet chain=postrouting comment="" connection-mark="youtube DOWNS" disabled=no new-packet-mark=youtube passthrough=no protocol=tcp


/queue type
set default-small kind=pcq name=default-small pcq-classifier=src-address,dst-address,src-port,dst-port pcq-limit=50 pcq-rate=0 pcq-total-limit=2000

/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=512K name=queue1 packet-mark=youtube parent=global-out priority=8 queue=default-small



in this code it is limited by 512k you can change it to what you want
 
Discus
newbie
Posts: 36
Joined: Fri Nov 13, 2009 1:55 pm
Location: South Africa

Re: Download limit for websites like youtube, rapidshare etc

Thu Oct 25, 2012 12:14 pm

It works by examining the packets for Layer7 traffic containing "videoplayback" (which youtube uses) and then assigning packet marks based on this which are then used in the queues to limit traffic.

You may find (if you have space/computer lying about the place) that squid offers more power for this kind of thing.

Who is online

Users browsing this forum: Amaan, GoogleOther [Bot], mansuramir, shahzaddj1 and 166 guests