Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jun 2000 15:39:13 -0700
From:      Alfred Perlstein <bright@wintelcom.net>
To:        craig.massey@iname.com
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: A quota system for modem time accessed from a '98 PC
Message-ID:  <20000629153913.Z275@fw.wintelcom.net>
In-Reply-To: <000629182541BE.18742@weba2.iname.net>; from craig.massey@iname.com on Thu, Jun 29, 2000 at 06:25:41PM -0400
References:  <000629182541BE.18742@weba2.iname.net>

next in thread | previous in thread | raw e-mail | index | archive | help
* craig.massey@iname.com <craig.massey@iname.com> [000629 15:26] wrote:
> My somewhat inactive teenage step-son accesses the web from his
> '98 PC through our FreeBSD server. I'd like to be able to put limits
> on his surfing hours per month/week/day linked to the amount he
> contributes to the household chores.
> 
> I can think of several ways to do this which all involve some
> scripting on my part. Paradoxically, I know Perl on NT quite well,
> but have never used it on a Unix OS, so I'd have some work to do.
> 
> Is there an established way of achieving a quota on modem time?
> If not I'll have to roll up my sleeves and get inventive.

I think an inventive trick would be to use cron to every 5 minutes
check an IPFW counter you setup to watch his machine's bandwidth
usage.  Reset the counter every 5 minutes, and if it's non-zero
(or maybe above several KB) then "charge" him for the time.

You could store this in a simple data file and when the time limit
is exceeded then simply set a rule to completely block, at midnight
just run a script to remove the initial rule and reset the accounting
file.

> ps I'm going to encourage him to circumvent any system I put in
> place. Hacking his way past it will force him to learn something
> and that's even better than getting help with the housework.

heh heh heh...  best of luck. :)

try to wrap lines at 70 characters, makes it easier for us to read.

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000629153913.Z275>