From owner-freebsd-questions@FreeBSD.ORG Sat Feb 25 20:52:21 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 301F416A420 for ; Sat, 25 Feb 2006 20:52:21 +0000 (GMT) (envelope-from fbsd_user@a1poweruser.com) Received: from mta10.adelphia.net (mta10.adelphia.net [68.168.78.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id C340C43D45 for ; Sat, 25 Feb 2006 20:52:20 +0000 (GMT) (envelope-from fbsd_user@a1poweruser.com) Received: from barbish ([69.172.31.117]) by mta10.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with SMTP id <20060225205219.VOMD13051.mta10.adelphia.net@barbish>; Sat, 25 Feb 2006 15:52:19 -0500 From: "fbsd_user" To: , Date: Sat, 25 Feb 2006 15:52:19 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <44002E1B.7040201@trusc.net> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478 Importance: Normal Cc: Subject: RE: pf binat problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: fbsd_user@a1poweruser.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2006 20:52:21 -0000 This question was just covered on this list during the last 7 days. Search the questions archives at http://freebsd.rambler.ru/ -----Original Message----- From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of Leon Botes Sent: Saturday, February 25, 2006 5:15 AM To: freebsd-questions@freebsd.org Subject: pf binat problem # network diagram # __________ # | | --- # | | # ---| freebsd | --- # | pf | # ---| firewall | ---- # | | # (internal nets) |__________| (external nets) Default Gateway is . When a connection arrives on one of the dsl_if's it is redirected to the correct port on the dms_srv, traced via tcpdump. The dmz_srv responds but tries to send its reply out the default gateway instead of via the interface the connection arrived on. The dmz server is actually a LVS cluster masqueraded. All connections coming in via the dig_if get redirected and work fine. How can i tell pf to return connections out the same interface they arrived on and not use the default route out dig_if? dsl1_if = "rl3" dsl1_rt = "172.16.3.1" dsl1_ip = "172.16.3.2" dsl2_if = "rl1" dsl2_rt = "172.16.4.1" dsl2_ip = "172.16.4.2" dmz_if = "rl0" dmz_srv = "172.16.2.4" dmz_if_ip = "172.16.2.3" pri_if = "rl2" pri_ip = "192.168.254.1" binat on $dig_if from $dmz_srv to any -> $dig_ip binat on $dsl1_if from $dmz_srv to any -> $dsl1_ip binat on $dsl2_if from $dmz_srv to any -> $dsl2_ip nat on $dig_if from to any -> $dig_ip nat on $dsl1_if from to any -> $dsl1_ip nat on $dsl2_if from to any -> $dsl2_ip rdr on $dsl1_if inet proto tcp from any to $dsl1_ip port { 25, 80, 110 } -> $dmz_srv rdr on $dsl2_if inet proto tcp from any to $dsl2_ip port { 25, 80, 110 } -> $dmz_srv Thanks Leon _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"