I dunno if this would help, but there's mod_bandwidth for apache, if you're looking to limit bandwidth on an http server.
How can I limit the amount of bandwidth I use by the day? For example, let's say I only want to be able to use 750 Mbytes (incoming + outgoing) of bandwidth within a 24 hour time period. Is there a way of issuing "ifconfig <interface> down" if it hits this limit?
I dunno if this would help, but there's mod_bandwidth for apache, if you're looking to limit bandwidth on an http server.
I don't know of an existing tool but one could be written. Something that does a ifconfig eth0, grabs the "RX bytes:270258278 (257.7 Mb) TX bytes:120446255 (114.8 Mb)" line, then if it's in X range, ifconfig eth0 down. The only possible challenge would be resetting the numbers each day. (unload/reload module at worst)
[quote author=gorn link=board=4;threadid=9707;start=0#msg88172 date=1093222782]
I don't know of an existing tool but one could be written. Something that does a ifconfig eth0, grabs the "RX bytes:270258278 (257.7 Mb) TX bytes:120446255 (114.8 Mb)" line, then if it's in X range, ifconfig eth0 down. The only possible challenge would be resetting the numbers each day. (unload/reload module at worst)
[/quote]
That would work, but the problem is that it's reactive and will likely not issue a shut down command until afterwards.
Anyway, I got a tip from another place to check out the QUOTA module for netfilter/iptables
Bookmarks