From owner-freebsd-net@FreeBSD.ORG Fri Feb 29 15:55:24 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1223A106566B for ; Fri, 29 Feb 2008 15:55:24 +0000 (UTC) (envelope-from gizmen@blurp.pl) Received: from albion.azs.pwr.wroc.pl (albion.azs.pwr.wroc.pl [156.17.17.145]) by mx1.freebsd.org (Postfix) with ESMTP id C77AB8FC12 for ; Fri, 29 Feb 2008 15:55:23 +0000 (UTC) (envelope-from gizmen@blurp.pl) Received: from [10.8.1.58] (unknown [213.172.177.22]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by albion.azs.pwr.wroc.pl (Postfix) with ESMTP id 42CF9115F8 for ; Fri, 29 Feb 2008 16:35:42 +0100 (CET) From: Bartosz Giza Organization: BLURP.pl To: freebsd-net@freebsd.org Date: Fri, 29 Feb 2008 16:35:38 +0100 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802291635.38308.gizmen@blurp.pl> Subject: redirecting connections based on probability X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Feb 2008 15:55:24 -0000 Hi, I have to do such a thing like redirecting connections to port 80 based on probability. For example i need to redirect 10% requests to my web server and other 90% of requests should go to the original location. I know that pf has probability feature but there is no probability option for rdr rules. I have tryied couple of methods that could work but they didn't :( The problem is that rdr rules works on incoming packets so i can't use them dirrectly because i don't want to redirect all packets to different location. Could somebody tell me is such a thing possible in pf ? If yes please point me how is that possible. Very thanks