Skip to contentSkip to conversation

accounting

DISCUSSION Andrej Ricnik 3 participants 4 messages Feb 12, 2003 – Feb 13, 2003 netfilter

lore
Share & tools
lore
#0 lore raw

Hi Guys!

I've been searching for a decent Linux IP accounting solution (I have a 5GB limit a month and don't want to pay a penalty just because the kids are greedy :}) but couldn't find anything easy to use/decent that would allow me to keep track of traffic per IP and/or user and stop traffic from that IP/user once their "fair share" is used up ...

So I was wondering how difficult it would be to intercept logging information from userland, and where to find info's on how to do it.

Cheers,
Tink

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/IT/O d-(++)@ a C+(+++)@ UL++>+++ P+>+++ L++ E+@ W+@ N+ o? K? w---@(+) O+++(+)@ M-@ V? PS+ PE- Y+ PGP++ t- 5- X- R-(*) tv-@ b+ DI++ D-- G++ !e* h--- r++ z? ------END GEEK CODE BLOCK------

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail

#1 lore raw

Hello Andrej,

First of all: If you want a hardlimit, this is easy, there's an extended match target, quota, which takes care of dropping a rule, as soon, as the limit is hit.
So you can setup up rulkes for each ip, and make the rule basicly drop
....
And if there is no rule, you can set up one matching, since it has a counter.

but, it is not too easy, to gather the information, you can either iptables -L -v -x to grab the counters and parse the output ... or use libiptc to do so ...

I kinda face the same problem here, just that I want the whole enchilada database backed, and the rules should be generated from a database with user information.
I am working on some c++ progs etc. to make a solution for our scenario ... but it's all still earliest work in progress.

it's a pitty, I couldn'T find anythign usefull :-( could have save me hours of work :-)

Thursday, February 13, 2003, 12:27:24 AM, you wrote:

AR> Hi Guys!

AR> I've been searching for a decent Linux IP accounting AR> solution (I have a 5GB limit a month and don't want AR> to pay a penalty just because the kids are greedy :}) AR> but couldn't find anything easy to use/decent that would AR> allow me to keep track of traffic per IP and/or user AR> and stop traffic from that IP/user once their "fair share" AR> is used up ...

AR> So I was wondering how difficult it would be to intercept AR> logging information from userland, and where to find AR> info's on how to do it.

AR> Cheers,
AR> Tink

AR> -----BEGIN GEEK CODE BLOCK-----
AR> Version: 3.12
AR> GCM/IT/O d-(++)@ a C+(+++)@ UL++>+++ P+>+++ L++ E+@ W+@ N+ o? K? w---@(+) AR> O+++(+)@ M-@ V? PS+ PE- Y+ PGP++ t- 5- X- R-(*) tv-@ b+ DI++ D-- G++ !e* AR> h--- r++ z?
AR> ------END GEEK CODE BLOCK------

AR> _________________________________________________________________ AR> Tired of spam? Get advanced junk mail protection with MSN 8. AR> http://join.msn.com/?page=features/junkmail

Signature · 2 lines
Best regards,
 DarKRaveR                            mailto:[email protected]
#2 lore raw

Hi,

Quoted 11 lines · Andrej Ricnik

I've been searching for a decent Linux IP accounting solution (I have a 5GB limit a month and don't want to pay a penalty just because the kids are greedy :}) but couldn't find anything easy to use/decent that would allow me to keep track of traffic per IP and/or user and stop traffic from that IP/user once their "fair share" is used up ...

So I was wondering how difficult it would be to intercept logging information from userland, and where to find info's on how to do it.

as for the logging of traffic, this is really easy. You could use an iptables rule, as DarKRaveR suggested, or just use snmp (interfaces.ifTable.ifEntry.ifInOctets*).

But for the assurance of a given limit, you will need a lot more.

Quoted 8 lines · DarKRaveR

I kinda face the same problem here, just that I want the whole enchilada database backed, and the rules should be generated from a database with user information.
I am working on some c++ progs etc. to make a solution for our scenario ... but it's all still earliest work in progress.

it's a pitty, I couldn'T find anythign usefull :-( could have save me hours of work :-)

Stop working, look here:
https://rnvs.informatik.tu-chemnitz.de/Dynshaper/

It is already up and running, doing everything you can dream of: shaping to a given limit, dynamic traffic adjustment based on long term traffic analysis, database backend, IP based class allocation, Web-Frontend, Database-Backend, ... and it's GPL!

The only disadvantage: it seems there is only a German documentation.

Ciao!
Thomas

Signature · 1 line
"vi is my shepard, I shalt not font."
#3 lore raw

Hello Thomas,

Thnx for that pointer, seems really nice for the purpose it was done for, and I plan on having features like that in the end, but there's unfortunately so much more, the app I work on needs to take care off :-(. it starts with things like having a group of people which administer the system for different location and therefore having different rights etc. and the way the user interacts with the system...

So, it won't help me for now, save me time, maybe in a later stage, when I can borrow some ideas or something :-)
But maybe this works fine for andrej ...

Thursday, February 13, 2003, 5:46:48 PM, you wrote:

TP> Hi,

Quoted 11 lines · Andrej Ricnik
Quoted 11 lines

I've been searching for a decent Linux IP accounting solution (I have a 5GB limit a month and don't want to pay a penalty just because the kids are greedy :}) but couldn't find anything easy to use/decent that would allow me to keep track of traffic per IP and/or user and stop traffic from that IP/user once their "fair share" is used up ...

So I was wondering how difficult it would be to intercept logging information from userland, and where to find info's on how to do it.

TP> as for the logging of traffic, this is really easy. You could use an TP> iptables rule, as DarKRaveR suggested, or just use snmp TP> (interfaces.ifTable.ifEntry.ifInOctets*).

TP> But for the assurance of a given limit, you will need a lot more.

Quoted 8 lines · DarKRaveR
Quoted 8 lines

I kinda face the same problem here, just that I want the whole enchilada database backed, and the rules should be generated from a database with user information.
I am working on some c++ progs etc. to make a solution for our scenario ... but it's all still earliest work in progress.

it's a pitty, I couldn'T find anythign usefull :-( could have save me hours of work :-)

TP> Stop working, look here:
TP> https://rnvs.informatik.tu-chemnitz.de/Dynshaper/

TP> It is already up and running, doing everything you can dream of: shaping TP> to a given limit, dynamic traffic adjustment based on long term traffic TP> analysis, database backend, IP based class allocation, Web-Frontend, TP> Database-Backend, ... and it's GPL!

TP> The only disadvantage: it seems there is only a German documentation.

TP> Ciao!
TP> Thomas

Signature · 2 lines
Best regards,
 DarKRaveR (Sven)                           mailto:[email protected]