Bandwidth Measuring

Rob Park rbpark-NOSPAM at ualberta.ca
Tue Feb 11 11:02:15 PST 2003


> Second, you should download and install iptables.
> http://www.iptables.org/

You can do this:

iptables --line-numbers -nvL

And that shows you how many packets (and how many MBs...) got hit for
each firewall rule, and in total. 

It would be trivial to write a script that processes that, and then just
pulls the plug on the connection (ifconfig eth0 down) if it's over a
certain limit.

Then just have another script that clears and resets the iptables rules
at midnight, so the counters are set back to 0 (and bring eth0 back up
if it went down...).

-- 
Rob Park
http://www.ualberta.ca/~rbpark
--
Inform all the troops that communications have completely broken down.
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-chat' in the subject header of the message



More information about the lfs-chat mailing list