I'm trying to limit bandwidth in centOS. I have tried using bw_module, cband_module and bandwidth_module, but all of those required to use the httpd.conf and must restart httpd!

I have to do this live. I want to allow smooth updates when the site is up and DO NOT restart. Is there any way to use .htaccess and not httpd.conf?

Here is my httpd.conf code:

CBandScoreFlushPeriod 1
CBandRandomPulse On
<Virtualhost *>
    BandwidthModule On
    ForceBandWidthModule On
    Bandwidth all 500000
    Servername www.XXX.com
</Virtualhost>

I need to insert

Bandwidth 123.456.748.9 20000

for a lot of IPs and to be dynamic. Is there any way?

link|improve this question
feedback

migrated from stackoverflow.com Aug 30 '11 at 18:27

This question came from our site for professional and enthusiast programmers.

1 Answer

It is possible to do this with iptables (see http://blog.edseek.com/~jasonb/articles/traffic_shaping/).

link|improve this answer
I have tried iptables and no luck i used the tutorial : szabilinux.hu/bandwidth/index.html which sets 2 groups of Download and upload (can make more) and then i can add ip to the groups. the problem is i tried add my ip and its not working help? – user76583 Aug 31 '11 at 11:08
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.