I've been trying to set up traffic quotas for users on a shared server and i believe [with my limited knowledge] that iptables --quota and ports which have been selected for each user [--dport] is the way to do this...
iptables -A OUTPUT --dport 1,2,3,4... --quota 123412341234 -j ACCEPT
iptables -A OUTPUT --dport 1,2,3,4... -j DROP
I think something like this would work to limit the traffic [and reset every month] but its only for traffic going out.
- Is there something I could do to combine -A OUTPUT and -A INPUT into one quota?
- Or, is there a different method I could use to achieve the same thing more efficiently?
OS is debian squeeze