From owner-freebsd-questions Sun Jan 6 11:12:58 2002 Delivered-To: freebsd-questions@freebsd.org Received: from falcon.prod.itd.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by hub.freebsd.org (Postfix) with ESMTP id 44D5F37B402 for ; Sun, 6 Jan 2002 11:12:53 -0800 (PST) Received: from user-33qtnuo.dialup.mindspring.com ([199.174.223.216] helo=gohan.cjclark.org) by falcon.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 16NIiu-00029U-00; Sun, 06 Jan 2002 11:12:51 -0800 Received: (from cjc@localhost) by gohan.cjclark.org (8.11.6/8.11.1) id g06J8CU00278; Sun, 6 Jan 2002 11:08:12 -0800 (PST) (envelope-from cjc) Date: Sun, 6 Jan 2002 11:06:44 -0800 From: "Crist J. Clark" To: Dean Hollister Cc: questions@freebsd.org Subject: Re: ipfw question Message-ID: <20020106110643.A237@gohan.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <20020105184641.G204@gohan.cjclark.org> <20020106113530.R85470-100000@odyssey.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020106113530.R85470-100000@odyssey.apana.org.au>; from dean@odyssey.apana.org.au on Sun, Jan 06, 2002 at 11:36:40AM +0800 X-URL: http://people.freebsd.org/~cjc/ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Jan 06, 2002 at 11:36:40AM +0800, Dean Hollister wrote: > On Sat, 5 Jan 2002, Crist J. Clark wrote: > > > > I need to divert any outgoing packet on port 100 to any host over to the > > > same port on machine B. > > > > # ipfw add fwd 2.2.2.2 from 1.1.1.1 to any 100 out > > > > Should do it, provided, > > > > 1) 2.2.2.2 is local to 1.1.1.1 > > On the same LAN in other words? Yes. > > 2) This is _really_ what you want to do. You do realize that the > > fwd'ed packet is NOT modified. Machine B will receive a datagram > > without the destination address changed in any way (if 1.1.1.1 was > > sending a datagram to 3.3.3.3, port 100, Machine B will receive a > > datagram with a destination address of 3.3.3.3, port 100). > > That's fine - I need the destination address to receive the correct origin > address. NAT doesn't change the origin, it changes the desitnation. In this case, it would change the destination address to 2.2.2.2 rather than 3.3.3.3. > > As I think I said before, you probably actually want to do NAT of some > > sort. > > NAT changes the origin. Destination. -- "It's always funny until someone gets hurt. Then it's hilarious." Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message