From owner-freebsd-questions Mon Nov 19 16:33:53 2001 Delivered-To: freebsd-questions@freebsd.org Received: from apollo.sitaranetworks.com (apollo.sitaranetworks.com [199.103.141.105]) by hub.freebsd.org (Postfix) with ESMTP id 4EC9537B405 for ; Mon, 19 Nov 2001 16:33:48 -0800 (PST) Received: from rios.sitaranetworks.com (rios.sitaranetworks.com [199.103.141.78]) by apollo.sitaranetworks.com (8.10.2+Sun/8.9.3) with ESMTP id fAK0XNP29759 for ; Mon, 19 Nov 2001 19:33:23 -0500 (EST) Received: by rios.sitaranetworks.com with Internet Mail Service (5.5.2653.19) id ; Mon, 19 Nov 2001 19:33:37 -0500 Message-ID: <31269226357BD211979E00A0C9866DAB02BB974C@rios.sitaranetworks.com> From: Chris Ptacek To: "'freebsd-questions@freebsd.org'" Subject: SSH forwarding questions. Date: Mon, 19 Nov 2001 19:33:28 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" 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 What I am trying to do is setup forwarding of a port (5907) from the remote machine (server) to my local machine (client) using a different port (5901). The setup looks a little like this: Client NAT/Firewall +---+ +---+ | 1 |----| 2 |---> Internet +---+ +---+ +---+ +---+ Internet -->| 3 |----| 4 | +---+ +---+ Server/NAT Remote machine behind NAT I would like to connect (with SSH) from machine 1 to machine 3 and setup remote forwarding of the port. When machine 4 tries to connect to the given port on machine 3 it is forwarded to machine 1. The command I am trying is as follows: ssh -C -l -R 5907:localhost:5901 Machine 1 is running FreeBSD 3.1 Machine 3 is running FreeBSD 4.4 I can make the ssh connection between Machine 1 and Machine 3, but it doesn't seem to be forwarding the ports. Some other tests I did: On a FreeBSD 3.1 machine on the same subnet as Machine 1 I tried the above command. I was able to successfully forward the port and connect. On a FreeBSD 4.3 machine on the same subnet as Machine 1 I tried the above command. I was not able to successfully forward the port and connect. I am guessing that this may not be a NAT issue since I also seem to be having troubles with the 4.3 box on the local subnet. The difference is that a netstat -na shows the listening on 5907 on the 4.3 box (can't connect though) while a netstat -na doesn't show anything listening on 5907 on machine 3. Any information on how to solve this problem would be greatly appreciated. Is this a configuration problem, a NAT issue, or both? Thanks, Chris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message