VNC Viewer by RealVNC can fail to connect to a VNC server for numerous reasons. Error codes include “VNC connection refused” when it’s security-related, or “VNC failed to connect to server” for network issues. Many of these can only be resolved on the server side, but at least you’ll know what’s going on, and could ask the host for a specific fix. In addition, some issues can be addressed from the client.
Compare Viewer and Server Versions
If you’re using the VNC Viewer to connect to a RealVNC server, both need to be the same version, presumably for security reasons. Version difficulties can lead to VNC not connecting.
– You can find the version of the client by going to Help > About… on the menu bar of the app.
– You can find the server’s version by right-clicking its icon on the Taskbar and selecting “About…”
If either is out of date, use the “Check for updates…” option, located under “File” in the Viewer, and in the aforementioned taskbar menu in the Server.
Verify the Server’s IP
If you’re repeatedly failing to connect to a given IP, there’s a very simple way to check it: open the Terminal (no need for admin rights) in the Windows+X menu, and type in “ping [given IP]”. If the pings are going through, you can focus on solving other issues with the connection. If they aren’t, you’ve either been given the wrong IP address, or made a typo.
In addition, be specific when filling in the VNC port of the server (the port number is located after the colon in the IP address). If it uses the default VNC port (5900-590X, with X being the number of the display), there’s no need for the port number at all; otherwise, you not only need the number, but it may also need to be specifically permitted through the firewall server-side.
Change Server Settings
In this example, we’re using the free TigerVNC server and its configuration utility, but given that VNC is a standardized protocol, most options will be essentially the same as RealVNC, with one notable exception.
First, password protection is very important to set in VNC, since clients may fail to connect if there is no password. While you’re in the security settings, make sure that everything matches with the client, including encryption.
Second, ask the server administrator to check if the VNC port is properly set. The port may have been changed if it was in use by other applications, which would lead to VNC viewer not connecting.
Finally, there is an important RealVNC-specific setting. Since RealVNC is a cloud platform, you may need to enable direct connections if the host and the client are both on a local network.
Add a Firewall Exception
This is only important server-side, and the steps differ between Windows and Linux. An improperly set up Firewall can lead to messages such as “VNC connection refused”.
On Windows, you can add a specific application to firewall exceptions by completing the following steps.
-
Search “Firewall” in the Search Bar and open the Control Panel subcategory from the results.
-
Go to “Allow an app or feature through Windows Defender Firewall”.
-
Click “Change settings” and look for your app on the list.
-
If you can’t find the app on the list, or use the “Allow another app” button and find the application’s executable.
On Linux, you can use apps like gufw to add firewall exceptions for specific ports. However, the firewall is disabled by default, so if you didn’t enable it, the problem likely lies elsewhere.
-
Open gufw, toggle Status, and click the + under the Rules tab.
-
Use the Simple tab to allow a range of ports to be accessed (in this case, these are ports 5900 through 5905).
-
You can now see the active rules on the list.
Keep the Server Awake
This is a very basic step that the server administrator may have missed. You can’t connect to a hibernating server. Simply disable screen blanking, hibernation, and other power-saving features to have it always ready for a VNC session.
Choose an Alternative
The simplest way to avoid VNC not connecting is to find a different solution altogether. HelpWire, in addition to being free, and supporting Windows, macOS, and Linux, has a number of other advantages.
-
Drag-and-drop file sharing
-
Unattended access
-
Customer and team management
-
Starting sessions with a link
-
Built-in chat
As a free app, HelpWire is one of the best remote support tools available on the market. Both personal and commercial users will enjoy its features.