Using VNC to Control PC behind NAT

You could connect through a reverse SSH tunnel. Configure your router to forward some port (say 2222/tcp) to a local SSH server on your side. Have the remote user establish a reverse SSH tunnel from the host running the VNC server to your public IP address (a.b.c.d):

plink -R 5901:127.0.0.1:5901 -P 2222 -L USER a.b.c.d

Once the tunnel is established, you can connect with the VNC client your SSH server's IP address, e.g.

vncviewer 192.168.23.42:1

or (when the SSH server is running on your workstation

vncviewer 127.0.0.1:1

The NatToNat add-on uses a similar (though slightly different) approach.


When try to help my 80 year old Dad remotely I have used a VPN to avoid all the NAT/Firewall etc issues. I used Logmein Hamachi to create a virtual network then got him to install Hamachi and join the network with the user name/password. Simple and hopefully secure connectivity.

I then got him to install UltraVNC Server whilst I installed the viewer. Connect using the VPN IP address - voila. Any remote control software will then run over the VPN, it doesn't have to be VNC.


If you are willing/able to use an alternative solution, I suggest teamviewer.

It's free for non commercial usage. Usage is really simple.

  1. Download/Install the software
  2. Start the Client, and give the other user the teamviewer ID and password ( both are visible on the main screen)

Other user can use given user/password combo to remotely connect and control the PC.