From owner-freebsd-ipfw@FreeBSD.ORG Thu Jul 26 13:14:13 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 797F316A417 for ; Thu, 26 Jul 2007 13:14:13 +0000 (UTC) (envelope-from ngharibyan@mail.ru) Received: from mx27.mail.ru (mx27.mail.ru [194.67.23.64]) by mx1.freebsd.org (Postfix) with ESMTP id 0B9CD13C45D for ; Thu, 26 Jul 2007 13:14:12 +0000 (UTC) (envelope-from ngharibyan@mail.ru) Received: from [91.103.27.104] (port=39092 helo=sis2w001) by mx27.mail.ru with asmtp id 1IE3AQ-000Emf-00 for freebsd-ipfw@freebsd.org; Thu, 26 Jul 2007 17:14:10 +0400 From: "Narek Gharibyan" To: Date: Thu, 26 Jul 2007 18:14:04 +0500 Message-ID: <017001c7cf86$daa2ad10$180ca8c0@arm.synisys.com> MIME-Version: 1.0 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcfPhtcDtgK8ERIITnqX4PqMjueRFA== 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 Subject: Policy - based Routing problem Need help 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: Thu, 26 Jul 2007 13:14:13 -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