From owner-freebsd-questions Wed May 13 10:48:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA07248 for freebsd-questions-outgoing; Wed, 13 May 1998 10:48:36 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from gdi.uoregon.edu (gdi.uoregon.edu [128.223.170.30]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA07240 for ; Wed, 13 May 1998 10:48:31 -0700 (PDT) (envelope-from dwhite@gdi.uoregon.edu) Received: from localhost (dwhite@localhost) by gdi.uoregon.edu (8.8.8/8.8.8) with SMTP id KAA01478; Wed, 13 May 1998 10:47:03 -0700 (PDT) (envelope-from dwhite@gdi.uoregon.edu) Date: Wed, 13 May 1998 10:47:03 -0700 (PDT) From: Doug White Reply-To: Doug White To: Andre Albsmeier cc: freebsd-questions@FreeBSD.ORG Subject: Re: Can this be done with natd in -STABLE? In-Reply-To: <199805121907.VAA22807@internal> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 12 May 1998, Andre Albsmeier wrote: > > -redirect_port linkspec > > > > Redirect incoming connections arriving to given port to > > another host and port. Linkspec is of the form > > > > proto targetIP:targetPORT [aliasIP:]aliasPORT [re- > > moteIP[:remotePORT]] > > > > I could be wrong about the host2:port1 thing. I think I am... Maybe it's > > host1:port1? > > Yes, I found that one also. However, I am not sure how to set it up > correctly: > > Assuming natd is running on nathost on port "natd 4665/divert" and > I want to redirect tcp connections going to host1:port1 in real to > host2:port2. host2 is connected to fxp0. > > First the ipfw statment: > > ipfw add divert natd all from any to any via fxp0 I think you want this one. > And the the natd line: > > natd -n fxp0 -redirect_port tcp host2:port2 host1:port1 > > I have tried around a little bit and I see packets going through > natd (when run with -v), but the connection never succeeds... I think this should be natd -n fxp0 -redirect_port tcp host2:port2 port1 Remember, everything behind the natd box is invisible and doesn't have real IPs. We want to make it look like the natd box provides the service but instead it just redirects the connections to the appropriate box. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message