From owner-freebsd-ipfw@FreeBSD.ORG Tue May 8 00:04:25 2007 Return-Path: X-Original-To: Freebsd-ipfw@freebsd.org Delivered-To: Freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4A1D216A41A for ; Tue, 8 May 2007 00:04:25 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outG.internet-mail-service.net (outG.internet-mail-service.net [216.240.47.230]) by mx1.freebsd.org (Postfix) with ESMTP id 5A2EE13C459 for ; Tue, 8 May 2007 00:02:58 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Mon, 07 May 2007 17:02:57 -0700 Received: from julian-mac.elischer.org (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id 6F6B4125B43; Mon, 7 May 2007 17:02:57 -0700 (PDT) Message-ID: <463FBE30.90009@elischer.org> Date: Mon, 07 May 2007 17:02:56 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.0 (Macintosh/20070326) MIME-Version: 1.0 To: Kirk Davis References: <33910a2c0705041812s2aaf0b62t785e16abc0decee6@mail.gmail.com> <463E377E.2000300@elischer.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Freebsd-ipfw@freebsd.org Subject: Re: Policy Routing natd+ipfw 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: Tue, 08 May 2007 00:04:25 -0000 Kirk Davis wrote: > > Julian Elischer wrote: >> in -current you can implement a routing table via FWD and tables. >> in 6.x you need to specify the next hop. and an more explicit rule. > > Is there any information floating around on how to do this in current > using the FWD rules and tables? Any pointer on where to look. man ipfw on -current basically you can implement alternate routing tables.. ipfw table 1 add 0.0.0.0/0 4.5.6.7 # default route for table 1 ipfw table 1 add 2.3.4.0/24 5.4.3.2 # but not for packets to 2.3.4.x ipfw table 2 add 0.0.0.0/0 7.6.5.4 #default route for table 2 ipfw table 2 add 2.3.4.0/24 6.5.4.3 # but differnet route for packets to 2.3.4.x ipfw add 100 allow ip from 1.2.3.0/24 to any out ipfw add 110 fwd tablearg ip from 1.2.4.0/24 to table(1) out ipfw add 120 fwd tablearg ip from 1.2.5.0/24 to table(2) out > > Right now I am using fwd rules on our BGP router (Quagga & FreeBSD > 6.2) to force one of our subnets out a particular interface and avoid > the routing table but I would prefer to do it more like a dual routing > table where I can make more routing decisions than just forcing all > packets from that subnet out the interface. I could test it on one of > our current boxes. > >> julian > > ---- Kirk