[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: IPTables and QOS



On Monday 17 March 2003 22:47, n/a wrote:
> Hello People,
>
> I'd like to know if it is at all possible to filter (generate bandwith
> logs) for each (internal) IP on a LAN ? The idea is that someone is sharing
> an internet connection but does not want his transfer block to run out
> before the end of the month with someone else using up all of the bytes.
> Thus there is some need to keep track of the amount of data a single IP has
> used allready.

I would just like to anounce that I have put to gether a small php project 
called phpBandwidth and it might be usefull for some people on this list. It 
logs the usage to a database at intervals of 5 minutes if there has been more 
than 50kb of transfers. This allowes you to get nice litle graphs of the 
usage, and ofcourse totals and stuff.
You can have as many users on the your net as you like, but you need to be 
running iptables and have routes that will capture the usage of each users 
net traffic.

Currently uses a postgre database, but the database API is only 130 lines, so 
if anybody running another database care to port that file and mail it to me 
that would be great!

Have a look:
http://alex.wigen.net/phpbandwidth
or
http://203.51.221.227/phpbandwidth

The script is available from
http://www.wigen.net/phpbandwidth

If anyone finds this usefull, I would love some feedback, or any ideas for 
improvement...

Cheers
Alex

-- 
Hompage: http://www.wigen.net
MSN: alexander_wigen@hotmail.com   ICQ: 3718651

Attachment: pgpr041Hqt44k.pgp
Description: signature


Reply to: