From owner-freebsd-questions@FreeBSD.ORG Tue Sep 26 10:30:15 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 BE14616A407 for ; Tue, 26 Sep 2006 10:30:15 +0000 (UTC) (envelope-from peter@bgnett.no) Received: from skapet.datadok.no (skapet.datadok.no [194.54.107.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id F301743D67 for ; Tue, 26 Sep 2006 10:29:09 +0000 (GMT) (envelope-from peter@bgnett.no) Received: from amidala.datadok.no ([194.54.103.98] helo=amidala.datadok.no.bsdly.net ident=peter) by skapet.datadok.no with esmtp (Exim 4.60) (envelope-from ) id 1GSABY-00021Z-6x for freebsd-questions@freebsd.org; Tue, 26 Sep 2006 12:29:08 +0200 To: freebsd-questions@freebsd.org References: <20060926073412.67655.qmail@web54409.mail.yahoo.com> From: peter@bgnett.no (Peter N. M. Hansteen) Date: Tue, 26 Sep 2006 12:29:05 +0200 In-Reply-To: <20060926073412.67655.qmail@web54409.mail.yahoo.com> (sonjaya's message of "Tue, 26 Sep 2006 00:34:12 -0700 (PDT)") Message-ID: <877izqyl8u.fsf@amidala.datadok.no> User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: Limit p2p with pf n altq X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Sep 2006 10:30:15 -0000 > also how to limit some ip not port with pf . you set up your queues, then assign traffic to them via your pass rules. Your pass rules can use whichever criteria you like, ie altq on $ext_if cbq bandwidth 10Mb queue { def, mostofmybandwidth, notalot } queue def bandwidth 20% cbq(default borrow red) queue mostofmybandwidth 77% cbq(default borrow red) { most_lowdelay, most_bulk } queue most_lowdelay priority 7 queue most_bulk priority 7 queue notalot 3% cbq [...] block all pass from $localnet to any port $allowedports keep state queue mostofmybandwidth pass from $iptostarve to any port $allowedports keep state queue notalot - you get the idea. -- Peter N. M. Hansteen, member of the first RFC 1149 implementation team http://www.blug.linux.no/rfc1149/ http://www.datadok.no/ http://www.nuug.no/ "First, we kill all the spammers" The Usenet Bard, "Twice-forwarded tales" 20:11:56 delilah spamd[26905]: 146.151.48.74: disconnected after 36099 seconds