From owner-freebsd-ipfw@FreeBSD.ORG Wed Jul 25 22:50:23 2007 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2929F16A417; Wed, 25 Jul 2007 22:50:23 +0000 (UTC) (envelope-from ngharibyan@mail.ru) Received: from mx4.mail.ru (fallback.mail.ru [194.67.57.14]) by mx1.freebsd.org (Postfix) with ESMTP id 951AE13C45E; Wed, 25 Jul 2007 22:50:22 +0000 (UTC) (envelope-from ngharibyan@mail.ru) Received: from mx33.mail.ru (mx33.mail.ru [194.67.23.194]) by mx4.mail.ru (mPOP.Fallback_MX) with ESMTP id 7FA33389DB3; Thu, 26 Jul 2007 00:26:30 +0400 (MSD) Received: from [91.103.27.104] (port=49012 helo=sis2w001) by mx33.mail.ru with asmtp id 1IDnRD-000Mg5-00; Thu, 26 Jul 2007 00:26:28 +0400 From: "Narek Gharibyan" To: , Date: Thu, 26 Jul 2007 01:26:17 +0500 Message-ID: <012001c7cefa$13ea3350$180ca8c0@arm.synisys.com> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcfO6trGBBhseyb+SDqlTLzK6ty2bgADwzfQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Policy Based Routing problem help me X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2007 22:50:23 -0000 Hi all, I have a firewall/router with FreeBSD 6.2 installed on it. 2 ISP connection and 2 LAN connections. I need to do a policy-based routing. All I need that packets coming from one ISP interface return to that interface (incoming connections' source based routing) and the other hand do a IP based routing from the LAN (Some packets will goes out via ISP 1 some others via ISP 2 depending on IPs requested). I tried to do that with ipfw fwd but it didn't work any way (e.g. with ip.forwarding enabled or no). Even I've disabled my static routes, default gw. Just it do nothing. Sample configs are ipfw add fwd ISP_gw from ${my lan} to any via ${eif} ipfw add fwd ISP_gw from ${my lan} to any out via ${eif} ipfw add fwd ISP_gw from any to any xmit ${eif} Ipfw add fwd ISP_gw from any to any via ${eif} out I don't use nat, proxy. Just need to route. Please help Regards, Narek