Error Messages

How to port forward to a VNC Server?

2679 views April 17, 2017 April 18, 2017 pohheng 0

Introduction:

VNC uses a basic authentication that allows you to connect to a VNC server. Once you are connected, traffic between the viewer and the server is unencrypted, and it is a security risk. It is recommend to use port forwarding or port tunnelling when accessing a VNC Server. One of the method is to use SSH.

Linux:

In a VNC Server, the Listening Port is 5902 on loop back interface (127.0.0.1). We are interested in forwarding the traffic from client side to remote server. The following syntax is to establish a SSH session listening to 15901 and forward traffic to remote server 5902.

$ ssh user@your.hostname.com -L15901:127.0.0.1:5902

Open a VNC viewer, type in 127.0.0.1:15901 to login.

screen_shot_2016-04-06_at_08.26.23

Windows:

Launch putty.exe, enter the Host Name, and Port.

screen_shot_2016-03-11_at_15.51.03

Under Category, click on Connection→Tunnels→Enter the following information in Source port, Destination and click Add button. In Source port, enter 15901. In Destination enter 127.0.0.1:5902.

screen_shot_2016-03-11_at_15.52.00

After that the Forwarded ports will be added.

screen_shot_2016-03-11_at_15.52.33

Under Category, click on Session. Under Saved Sessions, enter a valid name, click on Save button. A new record will be saved. Click on this new name, click Load button.

screen_shot_2016-03-11_at_15.53.34

Enter your credential.

screen_shot_2016-04-06_at_08.26.25

Open a VNC viewer, type in 127.0.0.1:15901 to login.

screen_shot_2016-04-06_at_08.26.23

 

Applies to:

  • Linux Operating System
  • Windows Operating System

Knowledge Base ID: 2017041701 - Last Review: Apr 17, 2017 - Revision: 1.1

Leave a Reply