Routers feature a basic firewall that blocks incoming connections in your home network. Thus, as you operate on your network space, your IP address remains unknown to the public internet, and you can also not access it outside your private network. Therefore, this feature poses a challenge if you want to use VNC for remote control and maintenance tasks. To deal with this limitation and allow remote computers to connect to a service or another computer within your private LAN, you need to open specific ports on your firewall through VNC port forwarding. We give you a step by step guide on how you can accomplish this on your own and remotely access your server from any location in the world.
How To Port Forward VNC
The steps followed in port forwarding VNC will vary depending on your router. However, you can generally forward VNC using the steps below:
Find the IP Address of Your PC Hosting the VNC Server
- Log in to your router’s web interface. To log in, you need a browser such as Edge, Firefox, or Chrome. On your chosen browser, find the address bar and replace the address on it with your router’s IP address, and press enter. This action will open a box, prompting you to enter your router’s credentials. Log in using the admin credentials if you have not changed them in the past.
- Find the port forwarding section of your router.
- Create a port forward entry. To do this, follow the steps below:
- Enter TCP 5900 as the source and destination port.
- Set the IP address of your local PC as the destination IP address
- Test your ports to see whether they are open and listening by running the GRC ShieldsUP Port Scanner.
Ports To Forward
The VNC ports you will forward for VNC can be configured on the server or exposed publicly, depending on your router configuration.
- If you are using VNC for TeamViewer, you will forward TCP 5800 and TCP 5900.
- For multiple displays, ports above 5901 are the best to use. Note that in this case, each display will use the next consecutive number.