From owner-freebsd-ipfw@FreeBSD.ORG Tue Dec 23 07:20:38 2003 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F397416A4CE for ; Tue, 23 Dec 2003 07:20:37 -0800 (PST) Received: from ip-213-17-211-16.broker.com.pl (ip-213-17-211-16.broker.com.pl [213.17.211.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 55AB443D7E for ; Tue, 23 Dec 2003 07:20:13 -0800 (PST) (envelope-from zk@wspim.edu.pl) Received: from hhos.serious.ld (localhost.serious.ld [127.0.0.1]) hBNFJVGQ001284 for ; Tue, 23 Dec 2003 16:19:31 +0100 (CET) (envelope-from zk@wspim.edu.pl) Received: (from zk@localhost) by hhos.serious.ld (8.12.9p2/8.12.8/Submit) id hBNFJVf2001283 for freebsd-ipfw@freebsd.org; Tue, 23 Dec 2003 16:19:31 +0100 (CET) Date: Tue, 23 Dec 2003 16:19:31 +0100 From: zk To: freebsd-ipfw@freebsd.org Message-ID: <20031223151931.GC274@hhos.serious.ld> References: <19235318750.20031223025510@vkt.lt> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19235318750.20031223025510@vkt.lt> User-Agent: Mutt/1.4.1i Subject: Re: ipfw forward command? X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2003 15:20:38 -0000 On Tue, Dec 23, 2003 at 02:55:10AM -0800, hugle wrote: > Hello. > As I understoon, ipfw's forward command goes before ipnat > How i can make it go in some other direction (ipnat then ipfw fwd)? > cause firstly I'd like to NAT packets and then forward them to needed > gateway. But since forward happens before NAT this can't be done, and > packets don't get forwarded to needed gw > default gw x.x.x.161 ip x.x.x.162 > second gw x.x.x.141 ip x.x.x.142 > third gw y.y.y.1 ip y.y.y.59 > > Any ideas? You can use ipfw divert with natd and put it before ipfw fwd. zk