Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


So I have a windows 8 PC (vnc viewer) and a iMac 10.8 Mountain Lion (vnc server) and a middleman server running ubuntu on a DMZ (all ports open). Both computers are behind a firewall with NO PORTS OPEN to the external world (except the middleman server).

VNC Server (iMac): phil@ (Private IP) Username: phil

Middleman Server: (I use domain names instead of IP for simplicity) Username: fixnode

VNC Viewer (Windows 8 PC): (private IP) (No SSH Server on PC)

Step 1: From the VNC Server (iMac) I run this command: ssh -f -N -R 5900:localhost:5900 and then I turn on my VNC server.

Step 2: Then from the Viewer (Windows 8 PC) I run Putty (ssh client) to connect to -p 5900

Note: In putty there is no feedback so I assume the tunnel is created (since there is no error)

Step 3: Using TightVNC Viewer (On Windows 8 PC) I put localhost:5900 and click connect

When I try to connect the viewer to the iMac the error I get is a timeout error, I have tried to edit my sshd_config file (on the middleman server) to allow gateway connections but nothing helps. Can anyone give me any suggestions?

Just to clarify BOTH PC and Mac are behind a firewall with NO PORTS OPEN

Thanks, Phillip K

share|improve this question
Anybody have an answer? – PhillipK Mar 25 '13 at 4:08
I'm working on a similar problem:… – MountainX Jul 9 '13 at 22:40
Basically, you are telling the "server" to listen on on the middleman server and telling the "client" to connect to a different address on the middleman server. You need to change the -R argument to either -R <IP address of>:5900:localhost:5900 -or- -R *:5900:localhost:5900. This change requires that the SSHD server have GatewayPorts enabled. – Yedric Aug 22 '13 at 14:30

You must log in to answer this question.

Browse other questions tagged .