Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Sep 2006 12:29:05 +0200
From:      peter@bgnett.no (Peter N. M. Hansteen)
To:        freebsd-questions@freebsd.org
Subject:   Re: Limit p2p with pf n altq
Message-ID:  <877izqyl8u.fsf@amidala.datadok.no>
In-Reply-To: <20060926073412.67655.qmail@web54409.mail.yahoo.com> (sonjaya's message of "Tue, 26 Sep 2006 00:34:12 -0700 (PDT)")
References:  <20060926073412.67655.qmail@web54409.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




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