VNC Ports To Open - How We Enable It - Bobcares

 Are you looking for which all ports to open in order to access VNC? Today, we will see how our Support Engineers opens ports for VNC. At Bobcares, we often get requests to allow VNC ports, as a part of our Server Management Services.

Overview
  1. What is VNC?
  2. How We Open VNC Ports?
    • Steps to Open VNC Ports in Linux
    • Steps to Open VNC Ports in Windows

What is VNC?

VNC aka Virtual Network Computing enables control over a remote system. Basically, it is a graphical desktop sharing system. We can access this through platforms like Linux, Windows, macOS.

But to use VNC, it is important to have an idea about the ports to use. So, let’s have a look at it.

Virtual Network Computing (VNC) is a remote desktop sharing technology that allows you to access and control another computer from a different location. It’s especially useful when you need to reach files or applications stored on a system that’s physically distant from you. All you need is a TCP/IP connection along with a VNC server on the remote machine and a VNC viewer on your local device. To establish the connection successfully, it’s also important to understand how VNC ports work.

Common Uses of VNC

VNC (Virtual Network Computing) allows users to view and control a remote computer’s desktop environment in real time. It works by sending the graphical output of the remote machine to your local system while transmitting your keyboard and mouse inputs back to the remote host. This enables complete control over the remote device as though you were sitting in front of it.

1. Cross-Platform Remote Access: With VNC, you can connect to your computer or server from anywhere with an internet connection. It supports multiple operating systems, including Windows, Linux, macOS, and Unix, so you can manage and operate devices across platforms without compatibility issues. This makes it an ideal tool for remote work, system administration, or accessing personal files while away from your desk.

2. Team Collaboration: VNC supports multiple simultaneous connections, allowing several users to view or work on the same desktop at once. This capability helps remote teams share ideas, provide feedback, and collaborate on live projects efficiently.

3. Troubleshooting and Support: IT teams often rely on VNC to provide remote assistance. By accessing the user’s desktop directly, technicians can identify and fix issues quickly without needing to be physically present.

How We Open VNC Ports?

To remotely access another system through VNC, you must first establish a connection using specific ports. By default, VNC operates on port 5900, while its web-based interface runs on port 5800. However, these aren’t fixed, you can use other ports by combining the default port with a chosen display number. For example, if the display number is 2, you simply add it to 5900, resulting in port 5902.

1. TCP Port 5900: This is the default port for the first VNC server. Each additional server increments the port number by 1. For example:

First VNC server: TCP port 5900

Second VNC server: TCP port 5901

Third VNC server: TCP port 5902 etc.

2. TCP Port 5800: This port is used for the VNC web interface, which allows you to access VNC sessions through a web browser. Similar to port 5900, each additional server increments the port number by 1. For example:

First VNC server web interface: TCP port 5800

Second VNC server web interface: TCP port 5801

Third VNC server web interface: TCP port 5802 etc.

The default ports that VNC uses is 5900. But for the web interface, it uses 5800. In addition, we can also use multiple ports starting from 5900+N. Now let’s check out how to open these ports on various platforms.

Steps to Open VNC Ports in Linux

Usually, our Support Engineers do this by forwarding the port in the router or by adding firewall rules.

VNC server is also known as Remote Frame Buffer (RFB). You can open VNC ports in either of the two ways.

Port forwarding in the router: So, to access VNC over Internet we open the ports in the router. Here are the steps we follow:

1. Initially, we access the router’s web interface.

2. Then select the section port forwarding.

3. Here we create a new rule for port forwarding. For this, we give the source and destination ports as TCP 5900. Then give the destination address as the IP of the local machine.

4. Later, we check if the ports are listening or not.

Adding firewall rules: Similarly, in a Linux system, we need to add firewall rules to open ports. By this, we ensure the port is open whenever a user tries to access it. Hence we add rules to open access to ports like 5900, 5800, etc.

Steps to Open VNC Ports in Windows

Usually, we open ports in Windows via the Windows Firewall with Advanced Security. Our Support Engineers do this as follows:

If you are using windows, you will need Group Policy Management Tools, which are part of the remote server administration tools to open VNC ports. It is available from the Microsoft website.

1. Firstly, we open the Group Policy Management Editor.

2. Here we select the option Windows Firewall with Advanced Security. And this option appears as,

VNC ports to open.

3. Then select the option Inbound Rules from Windows Firewall with Advanced Security

4. Now the New Inbound Rule Wizard opens.

5. Next, select the following options as moving forward.

  • Rule Type: Port
  • Protocol and Ports: TCP and give the Specific local ports as 5900.
  • Action: Allow the connection
  • Profile: Domain/ Private/ Public
  • Name: Provide the name and description if needed.

6. Finally, click Finish to exit and save the rule.

After successful completion of the above-mentioned steps, ensure the Group Policy Object is applied for proper computers using the group policy management tool.

How to Use VNC to Access a Remote Windows Server

Prerequisites

Make sure you have the server login credentials. These are usually emailed to you once the server is deployed. You can also find the username, password, and port information inside your Database Mart Control Panel. (Refer to the guide on managing servers in the control panel for details.)

1. Install VNC on the Remote Windows Server

First, connect to your Windows server remotely. (You can follow the guide on how to connect to a Windows Server.)

For this example, we’ll use TightVNC. Search for “TightVNC Server” online and visit the official website. Download the 64-bit installer (for 64-bit Windows) under “Get your free copy of TightVNC.”

Once downloaded, run the installer:

  • Click Next in the Setup Wizard.
  • Accept the License Agreement and continue.
  • Choose Typical setup and keep the default settings.
  • Click Install to begin installation.

You’ll be asked to set a VNC access password and optionally an administrative password. Click Finish to complete the setup.

2. Allow VNC Through Windows Firewall

After installation, TightVNC usually creates an inbound rule automatically. To confirm:

  • Open Windows Firewall with Advanced Security.
  • Click Inbound Rules.
  • Locate TightVNC, right-click, and select Properties to review the firewall settings.

3. Install VNC Viewer on Your Local Device

Next, install a viewer on your local computer. We’ll use RealVNC Viewer as an example.

  • Search for “VNC Viewer” online and go to the RealVNC site.
  • Download the Windows desktop version and run the installer.
  • Choose your preferred language, accept the license agreement, and click Next.
  • Select installation options and click Install to finish.

4. Connect to the Remote Server via VNC

Open VNC Viewer from your Start menu.

  • Sign in with your RealVNC account (or click Cancel to skip).
  • Go to File > New Connection.
  • Enter the IP address of your remote Windows server and click OK.
  • Right-click the new connection and select Connect.
  • When prompted, click Continue, then enter the VNC password you set earlier.

Once connected, you’ll see your remote desktop. Use the toolbar at the top to access features like zoom or send key combinations (e.g., Ctrl + Alt + Del to unlock the screen).

[Need assistance in accessing a VNC? – We can help you.]

Conclusion

In short, the VNC ports to open are the default ports 5900 and 5800. In addition, for accessing VNC via a web interface we can use port 5800. Today, we saw how our Support Engineers do this in Linux and Windows.

Related posts:

    1. VNC connection closed unexpectedly – Easy way to fix this error
    2. VNC the connection was refused by the computer – Let’s fix it!!
    3. Cloudflare Access VNC | Integration Guide
    4. Xstartup Permission Denied | Fixed

Từ khóa » Vnc 5900 Tcp