Skip to contentSkip to conversation

quota match with quota per ip

PATCH New diegows 1 participant 1 message May 26, 2003 netfilter

lore
Share & tools
lore

diegows

author
#0 lore raw

PATCH 1/1 quota match with quota per ip

Here is a modified patch of quota match. I add the destination ip quota match. I maintain a table with the quota used by each destination IP address, and match (or not match "!") according to the used quota. We use this in www.linux.org.ar for bandwith control. With this we mark the packets that have exceeded the quota and then we do shaping with QoS. For example:

iptables -I OUTPUT -m quota --ipdstquota ! 50000000 -j MARK --set-mark XX

Then all the packets that exceeded the 50 mb quota are mark for shaping. This is for avoiding bandwith abuses, for people that like download mirrors without sense.

Suggestions and comments are welcome, I 'm newbie...

Diego Woitasen
Lanux - Lanus Linux Users Group
Lanus, Buenos Aires, Argentina