Limit Youtube Bandwidth with Linux

henhanwan

Estimable
Nov 4, 2014
2
0
4,510
Hi, Currently im using squid to limit bandwidth in my office. But, squid can't go over HTTPS. Is there any method to limit https stream like youtube.com with linux?

Regards,

JH. Handi
 
Solution
This may help:

http://joeywhelan.blogspot.com/2015/04/taming-youtube.html

This is for networks though, and assumes your router runs Cisco IOS.


If this is for an individual machine, something like this may work:

http://lartc.org/howto/lartc.ratelimit.single.html


The problem is that this is for traffic shaping, which applies to packets *leaving* the interface. For controlling the packets *entering* the interface, you need policing:

http://blog.stevedoria.net/20050906/ingress-policing-with-linux-and-tc


There may be a way to use rule sets like these to drop packets selectively if bandwidth usage has gotten too high. It's inelegant, but if youtube sees that packets are being dropped, it *should* drop the...

JMW22

Estimable
Dec 21, 2015
3
0
4,520
This may help:

http://joeywhelan.blogspot.com/2015/04/taming-youtube.html

This is for networks though, and assumes your router runs Cisco IOS.


If this is for an individual machine, something like this may work:

http://lartc.org/howto/lartc.ratelimit.single.html


The problem is that this is for traffic shaping, which applies to packets *leaving* the interface. For controlling the packets *entering* the interface, you need policing:

http://blog.stevedoria.net/20050906/ingress-policing-with-linux-and-tc


There may be a way to use rule sets like these to drop packets selectively if bandwidth usage has gotten too high. It's inelegant, but if youtube sees that packets are being dropped, it *should* drop the quality of the video being watched automatically. It may also just stop playing the video if it doesn't have a low enough resolution available.

The problem is that the *rate* of ingress is not determined at your end, but on youtube's side. You will be relying on youtube behaving the way you want it to.

If at all possible, you should do this traffic policing at the router. Cisco IOS likely has a means of doing this on a per machine basis. Other routers should have analogous features to IOS if they are expensive, business class routers. If you are stuck just doing this on your own machine though, you can probably get away with using rule sets for tc.
 
Solution

henhanwan

Estimable
Nov 4, 2014
2
0
4,510


Oh hi,

I think i will pick the solution with Cisco IOS.

Thank you