Search squid archive

Limiting user's bandwidth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello everyone.

A while back I posted here that I was trying to control our user's bandwidth with iproute. I know it can be done with squid but, didn't want squid to do more than block some domains and do its caching which does pretty well. I have a script to control bw and assign each user 512kbps/256kbps. When I have squid running the control gets bypassed. 

I was marking packets on the FORWARD chain which caused to the bypass since the pages are served from the gw by squid instead of just doing the FORWARD. Now, I did some thinking, and changed the chain marking the packet to look like this:

$iptables -t mangle -A POSTROUTING -d 172.16.250.1 -j MARK --set-mark 1053
$iptables -t mangle -A POSTROUTING -d 172.16.250.1 -j RETURN

This controls the download bandwidth the way I want it. Works well. Now, for the upload speed I guess I'm having the same problem as before. The upload speed does not get controlled. I applied this chain:

$iptables -t mangle -A POSTROUTING -s 172.16.250.1 -j MARK --set-mark 1054
$iptables -t mangle -A POSTROUTING -s 172.16.250.1 -j RETURN

and the user can upload at full speed.

Also tried PREROUTING and nothing.

I need to control upload since I have some users uploading videos, mp3, and other stuff that consume most of the upload bw.

Does anyone has an idea how can I control the upload speed?

Thanks in advanced for your time and input.

Wilson


      


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux