From owner-freebsd-hackers Thu Jun 8 2: 3:56 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ns1.sunesi.net (ns1.sunesi.net [196.15.192.194]) by hub.freebsd.org (Postfix) with ESMTP id C6FB737B9D5 for ; Thu, 8 Jun 2000 02:03:45 -0700 (PDT) (envelope-from nbm@sunesi.net) Received: from nbm by ns1.sunesi.net with local (Exim 3.03 #1) id 12zyBL-000ABb-00; Thu, 08 Jun 2000 11:00:55 +0200 Date: Thu, 8 Jun 2000 11:00:55 +0200 From: Neil Blakey-Milner To: Poul-Henning Kamp Cc: Hans Huebner , freebsd-hackers@FreeBSD.ORG Subject: Re: IP prepaid accounting Message-ID: <20000608110055.A38991@mithrandr.moria.org> References: <31777.960398287@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <31777.960398287@critter.freebsd.dk>; from phk@critter.freebsd.dk on Wed, Jun 07, 2000 at 07:18:07PM +0200 Organization: Sunesi Clinical Systems X-Operating-System: FreeBSD 3.3-RELEASE i386 X-URL: http://rucus.ru.ac.za/~nbm/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed 2000-06-07 (19:18), Poul-Henning Kamp wrote: > It should be possible to say say > > ipfw deny all ip from any to any exquota any > > as well as: > > ipfw deny all ip from any to any exquota guest How about: ipfw quota 1 config quota 10MB (and similar conversions as pipe for MB, Mb, kB, kb, &c.) ipfw quota 2 config quota 20MB (and similar conversions as pipe for MB, Mb, kB, kb, &c.) ipfw add quota 1 ip from any to any (add to quota 1's count) ipfw add quota 2 ip from any to any (add to quota 2's count) ipfw add allow ip from any to any uquota 1 (allow unhindered ip when under quota) ipfw add deny ip from any to any oquota 2 (deny ip when over high quota) ipfw add pipe 1 ip from any to any oquota 1 (dummynet ip when over low quota) Possibly also rules like: ipfw add pipe 1 ip from any to any oquota 1 uquota 2 (dummynet middle quota) ipfw add pipe 2 ip from any to any oquota 2 uquota 3 (get even slower) ipfw add deny ip from any to any oquota 3 (total stop) (allowing for slower and slower service instead of just two levels) Neil -- Neil Blakey-Milner Sunesi Clinical Systems nbm@mithrandr.moria.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message