Limit Youtube Bandwidth with Linux

henhanwan

Estimable
Nov 4, 2014
2
0
4,510
0
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
 

JMW22

Estimable
Dec 21, 2015
3
0
4,520
2
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.
 

JMW22

Estimable
Dec 21, 2015
3
0
4,520
2
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.
 

henhanwan

Estimable
Nov 4, 2014
2
0
4,510
0


Oh hi,

I think i will pick the solution with Cisco IOS.

Thank you

 
Thread starter Similar threads Forum Replies Date
R Apps General Discussion 3
D Apps General Discussion 7
B Apps General Discussion 1
A Apps General Discussion 2
A Apps General Discussion 1
A Apps General Discussion 9
A Apps General Discussion 1
S Apps General Discussion 2
E Apps General Discussion 1
F Apps General Discussion 9
M Apps General Discussion 1
T Apps General Discussion 3
B Apps General Discussion 4
thetylero Apps General Discussion 2
G Apps General Discussion 0
D Apps General Discussion 5
C Apps General Discussion 1
B Apps General Discussion 2
M Apps General Discussion 1
O Apps General Discussion 1

ASK THE COMMUNITY