From owner-freebsd-net@FreeBSD.ORG Fri Nov 5 01:08:47 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 734D516A4CE for ; Fri, 5 Nov 2004 01:08:47 +0000 (GMT) Received: from mail0.jaist.ac.jp (mail0.jaist.ac.jp [150.65.5.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C6B743D2D for ; Fri, 5 Nov 2004 01:08:41 +0000 (GMT) (envelope-from zrelli@jaist.ac.jp) Received: from mail-vc.jaist.ac.jp (mail-vc.jaist.ac.jp [150.65.5.31]) by mail0.jaist.ac.jp (3.7W-jaist_mail) with ESMTP id iA518e216396 for ; Fri, 5 Nov 2004 10:08:40 +0900 (JST) Received: from mail-vc.jaist.ac.jp (localhost [127.0.0.1]) by localhost.jaist.ac.jp (Postfix) with ESMTP id 1A98F848E for ; Fri, 5 Nov 2004 10:08:40 +0900 (JST) Received: from smtp.jaist.ac.jp (smtp.jaist.ac.jp [150.65.38.97]) by mail-vc.jaist.ac.jp (Postfix) with ESMTP id F2F5E848C for ; Fri, 5 Nov 2004 10:08:39 +0900 (JST) Received: from [150.65.26.93] (wl-26093.jaist.ac.jp [150.65.26.93]) by smtp.jaist.ac.jp (3.7W-smtp) with ESMTP id iA516gK03391 for ; Fri, 5 Nov 2004 10:06:42 +0900 (JST) Message-ID: <418AD298.4090401@jaist.ac.jp> Date: Fri, 05 Nov 2004 10:08:40 +0900 From: Saber Zrelli User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: freebsd-net@freebsd.org References: <20041103003630.GA51913@mind.net><20041103011615.GA68454@falcon. midgard.homeip.net> <41892D72.10203@elischer.org> In-Reply-To: <41892D72.10203@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Simple port forwarding question X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2004 01:08:47 -0000 Julian Elischer wrote: > > > Erik Trulsson wrote: > >> On Tue, Nov 02, 2004 at 04:36:30PM -0800, John Fox wrote: >> >> >>> Hi, folks. >>> >>> I'm experimenting, trying to setup a situation where connections to >>> port 25 on machine A are forwarded to port 25 on machine B. >>> I've read the ipfw manpage and it looks as though what I'm doing >>> is correct. >>> >>> The IPFW rules on machine A are: >>> 00100 fwd machineB tcp from any to any 25 >>> 65535 allow ip from any to any >>> >>> And there is a sendmail listening on B's port 25. >>> >>> But when I telnet to machine A's port 25, all I get is >>> a perpetual "Trying" message that just sits there. >>> >> >> >> Don't use "fwd" for this - it doesn't work that way (for one thing B is >> unlikely to handle an IP-packet that is still adressed to A.) >> >> Use natd and the '-redirect_port' option to natd instead - that works. >> > > you can use ipfw fwd IF you also run it on the target machine to > "capture/accept" the foreign packet. > Otherwise teh packet will be forwarded back to it's stated > destination (or dropped). > > >> >> You may also try using ssh port forwarding ; Smple command : ssh2 -L 1234:localhost:23 username@host all traffic coming to port 1234 on the client will be forwarded to port 23 on the server (|host|). Note that |localhost| will be resolved by the sshdserver after the connection is established. In this case |localhost| therefore refers to the server (|host|) itself. >> >> >> >> > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"