From owner-freebsd-hackers Wed Jun 7 10: 8:30 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from outpost.huebner.org (hans.walledcity.de [212.84.209.59]) by hub.freebsd.org (Postfix) with ESMTP id 1C6A537BE67 for ; Wed, 7 Jun 2000 10:08:26 -0700 (PDT) (envelope-from hans@Huebner.ORG) Received: from localhost.huebner.org ([127.0.0.1] helo=localhost ident=hans) by outpost.huebner.org with esmtp (Exim 3.13 #1) id 12zjJb-0004ed-00 for freebsd-hackers@freebsd.org; Wed, 07 Jun 2000 19:08:27 +0200 Date: Wed, 7 Jun 2000 19:08:27 +0200 (CEST) From: Hans Huebner To: freebsd-hackers@freebsd.org Subject: Re: IP prepaid accounting In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi there, I've made a first shot at the prepaid system I described yesterday. Citing the ipfw manpage: The usage of IP quotas is illustrated by the following example: First, a quota entry is set up: ifpw quota set guest quota 100000 warn 90000 The above rule creates a quota entry which allows for 100,000 bytes to be transfered and which will trigger a warning message after 90,000 bytes have been used up. ipfw add quota guest ip from 192.168.1.0/24 to any ipfw add quota guest ip from any to 192.168.1.0/24 These rules assign all traffic to and from a /24 subnet to the quota en- try. ipfw deny all ip from any to any exquota This rule denies all traffic which has exceeded a quota. Typically, sys- logd(8) is used to process messages produced by the ipquota(4) system. The patch against -STABLE can be downloaded from http://huebner.org/ip-prepaid.patch I've tried patching a -CURRENT checkout and it seems to pass well with little fuzz. Any comments and suggestions are gladly appreciated. -Hans -- finger hans@huebner.org for details To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message