On Thu May 04 2000 at 19:49, "Jose" wrote:

> Hi,
> 
> I  have a 2GB/month limited access to Internet. My ISP gave me
> one IP so I use IP Masquarading. Working fine so far.
> 
> Trouble. I have to pay extra for every 100MB over 2GB comming
> through the connection link. I would use some kind of
> tarification, how many MB floats to each IP address of mine
> (from local net) and optionaly cut off an Internet access for an
> IP, that  will use up its share.
> 
> Is there some utility to handle this? I don't like the idea I
> should make one...
> 
> Thank you for any help you will provide.

man ipchains

Set up some packet accounting rules with ipchains that actually do
nothing but match for specific network traffic, for example:

        ipchains -A input -i eth0 -d 20.20.20.254

This is just an example, substitude the destination ip with your
public address.

This input chain rule will count the number of packets originating
from anything coming from the network(s) on eth0 destined for the
internet.

To see a packet summary count:

        ipchains -nvL

To see an exact byte count:

        cat /proc/net/ip_fwchains

As for cutting off access when limits are set... you'll have to
set up a cron job yourself to do this.  Shouldn't be too hard to
do using either a shell or perl script.

Cheers
Tony
 -=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-
  Tony Nugent <[EMAIL PROTECTED]>    Systems Administrator, RHCE
  GrowZone OnLine       (a project of) GrowZone Development Network
  POBox 475 Toowoomba Oueensland Australia 4350    Ph: 07 4637 8322
 -=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-=*#*=-
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to