From owner-freebsd-questions@FreeBSD.ORG Wed Aug 4 05:15:26 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CEA8016A4CE for ; Wed, 4 Aug 2004 05:15:26 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80C3B43D2D for ; Wed, 4 Aug 2004 05:15:26 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.11/8.12.11) id i745FP1x066861; Wed, 4 Aug 2004 00:15:25 -0500 (CDT) (envelope-from dan) Date: Wed, 4 Aug 2004 00:15:25 -0500 From: Dan Nelson To: Jonathan Message-ID: <20040804051525.GC85344@dan.emsphone.com> References: <4110130F.9080807@optonline.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4110130F.9080807@optonline.net> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: freebsd-questions@freebsd.org Subject: Re: Bandwidth Limiting X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Aug 2004 05:15:27 -0000 In the last episode (Aug 03), Jonathan said: > Hello, I run FreeBSD 5-2.1 on a serv4er box used for my company > (StreamForce Hosting Solutions). I was wondering if there is an > application i can install or method of limiting per user bandwidth by > like a certain group or class. If not is there a way to limit bandwidth > for all non super user accounts. ipfw rules plus dummynet should be able to do what you want. ipfw can filter on the uid or gid of the process sending/receiving the packet, so this should cause all non-root packets to get filtered through dummynet pipe 1 (which you could configure to run at 90% of your true capacity): ipfw add 400 skipto 402 ip from any to any uid root ipfw add 401 pipe 1 ip from any to any Hopefully ipfw will soon get the ability to use ALTQ which was recently merged into -current, so you can do some more advanced limiting. -- Dan Nelson dnelson@allantgroup.com