How to Log Account Usage?
pa_bryan at yahoo.co.uk
Thu Aug 1 21:31:18 EST 2002
-----BEGIN PGP SIGNED MESSAGE-----
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 sent
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 (tldp.org). Check
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. cron
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 www.iptables.org.
There are some really good how-to's here that I highly recommend. Anyone
connected to the net should have a reasonable grasp on this stuff. There's
also how-to's for ipchains (I can't remember where though, google is your
friend), but iptables offers some extra nice stuff.
Hope that helps,
On Thu, 1 Aug 2002 20:40, brt_informatics at wlink.com.np wrote:
> Now my Dialin server, using mgetty is up and running in Red Hat 7.2.
> Actually there was a bug in the ppp package that came along with the
> 7.2 installation cd. check out www.redhat.com for more information.
> Now the next challenge for me is to log user account usage? Can
> help me how to do that. Till now I've not seen any mgetty help pages
> reffering to this topic. Can user accounting be managed by mgetty or I
> have to use separate account?
> help me please.....
> Bikrant Neupane
E-Mail: pa_bryan at yahoo.co.uk
I need to discuss BUY-BACK PROVISIONS with at least six studio SLEAZEBALLS!!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
-----END PGP SIGNATURE-----
More information about the linux