The setup concept is like following diagram
VNC client<-->Internet<-->router<-->Raspberry Pi
- Setup VNC server
- sudo apt-get install tightvncserver
- vncserver -geometry 1024x768 -depth 24 and set password, this password is only used for VNC login
- You will require a password to access your desktops.Password:Warning: password truncated to the length of 8.Verify:Would you like to enter a view-only password (y/n)? nNew 'X' desktop is raspberrypi:1Creating default startup script /home/pi/.vnc/xstartupStarting applications specified in /home/pi/.vnc/xstartupLog file is /home/pi/.vnc/raspberrypi:1.log
- :1 is desktop number which stands for VNC port is 5901
- Setup virtual server on router/AP
- Enter virtual server settings in router
- Name: RPi
- IP address: loca network address of RPi, 192.168.x.y for example
- Public port: choose a valid port number, 8899 for example
- Private port: 5901
- Protocol: choose both TCP and UDP
- Connect to Raspberry Pi
- Check your worldwide IP address on Internet, w.x.y.z
- Open VNC client and enter address like w.x.y.z:8899
- Connect and it should work