From owner-freebsd-pf@FreeBSD.ORG Thu Sep 16 04:11:46 2004 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 674) id 3E1E116A4CF; Thu, 16 Sep 2004 04:11:46 +0000 (GMT) Delivered-To: mlaier@vampire.homelinux.org Received: (qmail 787 invoked by alias); 12 Aug 2004 04:13:47 -0000 Delivered-To: unirz@vampire.homelinux.org Received: (qmail 783 invoked from network); 12 Aug 2004 04:13:47 -0000 Received: from mailstud.rz.uni-karlsruhe.de (129.13.185.210) by pd9e39b01.dip.t-dialin.net with SMTP; 12 Aug 2004 04:13:47 -0000 Received: from spamstud.rz.uni-karlsruhe.de (spamstud.rz.uni-karlsruhe.de [129.13.185.237]) by mailstud.rz.uni-karlsruhe.de with esmtp (Exim 4.34 #1) id 1Bv700-0000Lr-OW for max.laier@stud.uni-karlsruhe.de; Thu, 12 Aug 2004 06:15:33 +0200 Received: from localhost (exim@[127.0.0.1]) by spamstud.rz.uni-karlsruhe.de with spam-scanned (Exim 4.34 #1) id 1Bv6si-0007o2-O2 for max.laier@stud.uni-karlsruhe.de; Thu, 12 Aug 2004 06:08:00 +0200 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.184]) by spamstud.rz.uni-karlsruhe.de with esmtp (Exim 4.34 #1) id 1Bv6si-0007nr-LI for max.laier@stud.uni-karlsruhe.de; Thu, 12 Aug 2004 06:08:00 +0200 Received: from [212.227.126.216] (helo=mxng20.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1Bv6si-00034h-00 for max.laier@stud.uni-karlsruhe.de; Thu, 12 Aug 2004 06:08:00 +0200 Received: from [206.53.239.180] (helo=turing.freelists.org) by mxng20.kundenserver.de with esmtp (Exim 3.35 #1) id 1Bv6si-0001gX-00 for max@love2party.net; Thu, 12 Aug 2004 06:08:00 +0200 Received: from localhost (localhost [127.0.0.1])ESMTP id 0489572C2C8; Wed, 11 Aug 2004 22:52:16 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07048-42; Wed, 11 Aug 2004 22:52:15 -0500 (EST) Received: from turing (localhost [127.0.0.1])ESMTP id 47CBC72C0A1; Wed, 11 Aug 2004 22:52:15 -0500 (EST) Received: with ECARTIS (v1.0.0; list pf4freebsd); Wed, 11 Aug 2004 22:51:57 -0500 (EST) X-Original-To: pf4freebsd@freelists.org Delivered-To: pf4freebsd@freelists.org Received: from localhost (localhost [127.0.0.1])ESMTP id 0DCF172C2C8 for ; Wed, 11 Aug 2004 22:51:57 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07581-17 for ; Wed, 11 Aug 2004 22:51:56 -0500 (EST) Received: from smtp02.net-yan.com (smtp02.hgcbroadband.com [210.0.255.157]) ESMTP id ACEC672C15B for ; Wed, 11 Aug 2004 22:51:55 -0500 (EST) Received: (qmail 41668 invoked from network); 12 Aug 2004 04:07:28 -0000 Received: from unknown (HELO [192.168.4.129]) (samwun@hgcbroadband.com@[221.127.106.172]) (envelope-sender ) by localhost (qmail-ldap-1.03) with SMTP for ; 12 Aug 2004 04:07:28 -0000 Message-ID: <411AEBFE.4040104@hgdbroadband.com> From: sam User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pf4freebsd@freelists.org References: <411722A1.1020108@mra.co.id> <200408091840.53308.max@love2party.net> <4118C330.8090609@mra.co.id> <200408111550.56346.max@love2party.net> <411AEAE5.9080106@mra.co.id> In-Reply-To: <411AEAE5.9080106@mra.co.id> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at freelists.org X-archive-position: 408 X-ecartis-version: Ecartis v1.0.0 Sender: pf4freebsd-bounce@freelists.org Errors-To: pf4freebsd-bounce@freelists.org X-original-sender: samwun@hgdbroadband.com Precedence: normal X-list: pf4freebsd X-Virus-Scanned: by amavisd-new at freelists.org X-Provags-Forward: max@love2party.net -> max.laier@stud.uni-karlsruhe.de X-Scan-Signature: 2edd2a636fcd0b7fd7ff155d39cb3399 X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on mail6.rz.uni-karlsruhe.de X-Spam-Status: No, hits=-4.9 required=7.0 tests=BAYES_00 autolearn=no version=2.61 X-Spam-Level: X-UID: 515 X-Length: 6181 X-Mailman-Approved-At: Thu, 16 Sep 2004 04:12:48 +0000 Subject: [pf4freebsd] Re: pf and ipfw X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.1 Reply-To: pf4freebsd@freelists.org List-Id: Technical discussion and general questions about packet filter (pf) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Thu, 16 Sep 2004 04:11:46 -0000 X-Original-Date: Thu, 12 Aug 2004 12:03:10 +0800 X-List-Received-Date: Thu, 16 Sep 2004 04:11:46 -0000 Muhammad Reza wrote: > Max Laier wrote: > >> On Tuesday 10 August 2004 14:44, Muhammad Reza wrote: >> >> >>> # nat outgoing connections on each internet interface >>> nat on $ext_if1 from $lan_net to any -> $gw1 >>> nat on $ext_if2 from $lan_net to any -> $gw2 >>> nat on $ext_if1 from $dmz_net to any -> $gw1 >>> nat on $ext_if2 from $dmz_net to any -> $gw2 >>> >>> # smtp access from outside >>> rdr on $ext_if proto tcp from any to $server_ext port smtp -> >>> $server_dmz port smtp >>> >> >> >> That can't work! For a client connecting to your smtp that would look >> like the following: >> 1) $client:cport connects to $server_ext:25 >> 2) pf RDRs to $server_dmz:25 >> 3) $server_dmz:sport replies to $client:cport >> 4) pf NATs to on of $gw1:sport1 or $gw2:sport2 >> 5) $client does not recognize as it is expecting to receive a reply >> from $server_ext and not from $gw1 or $gw2 >> >> You have to make sure that replies from $server_dmz are translated to >> $server_ext. >> >> >> > Thanks list for great response. > > to make sure that replies from $server_dmz are tranlated to > $server_ext, i add this line (cmiiw) > > nat on $ext_if1 from $dmz_net to any -> $server_ext > > This rule says to perform NAT on the $ext_if interface for any packets > coming from $dmz_net and to replace the source IP address with > $server_ext. > > but still can't work :(. But if add default gateway to internet. it > redirect can work, but not with load balance. > please help me > How about use "sticky" and "source-hash" in the rule? sam