How to Log Account Usage?

brt_informatics at brt_informatics at
Thu Aug 1 22:32:34 EST 2002

Thanks Paul.
That was a great help. With those rules I can log the account usage on
the basis of bandwidth consumend.
Also, I want to creat account usage log on the basis of connection
Can mgetty log those start and end of a sesion.

Thank you very much,

> Hash: SHA1
> You can use your firewall rules to implement ip accounting. 
> ipchains and iptables have packet and byte counts. 
> You can add a rule (with no target) for you're ppp interface that
matches all 
> packets. The byte count will then give you the total number of bytes
> in/out on that interface. You have one for incoming (your download
total) and 
> one for outgoing (your upload total). 
> As there is no target for the rule, your other rules won't be
affected. Also, 
> make sure this is the first rule in your input chain for that
interface (and 
> the same for output). That way, your other rules won't match and drop
out of 
> the chain before the packets are counted.
> There's a whole bit about this at the linux doco project (
> out the network administrators guide.
> You'll need to zero the rules periodically, and record the
packet/byte count. 
> Otherwise the counts will "overflow" at some point, and start again.
> should do this nicely.
> Of course, you can get as specific with your rules as you like. e.g.
you can 
> count the traffic on port 80. Anything you can do with rules, you can
do here 
> as it's just a rule with no target.
> If you don't know much about linux firewalls, check out 
> There are some really good how-to's here that I highly recommend.
> connected to the net should have a reasonable grasp on this stuff.
> also how-to's for ipchains (I can't remember where though, google is
> friend), but iptables offers some extra nice stuff.
> Hope that helps,
> Paul.
> On Thu, 1 Aug 2002 20:40, brt_informatics at wrote:
> > Hi,
> >  Now my Dialin server, using mgetty is up and running in Red Hat
> >  Actually there was a bug in the ppp package that came along with
> >  7.2 installation cd. check out for more
> >
> >  Now the next challenge for me is to log user account usage? Can
> > anybody
> >  help me how to do that. Till now I've not seen any mgetty help
> >  reffering to this topic. Can user accounting be managed by mgetty
or I
> >  have to use separate account?
> >
> >  help me please.....
> >  Thanks...
> >  Bikrant Neupane
> >  Kathmandu,Nepal
> - -- 
> Paul Bryan
> E-Mail: pa_bryan at
> PGP Key
> I need to discuss BUY-BACK PROVISIONS with at least six studio
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see
> iD8DBQE9SRwI3qGyTLHUBdoRApQhAJ4kqRXK49yeic7LcIEjc0jofcRopgCdFmoe
> pR+85whq7JDTpXiNgwt3Buo=
> =KuyM

More information about the linux mailing list