I am running an RHEL 7
instance in Amazon EC2 environment
with VNC enabled and running
(TigerVNC server) and listening on the expected ports:
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.4 (Maipo)
$ netstat -putna | grep LISTEN | grep vnc
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 2520/Xvnc
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 2520/Xvnc
tcp6 0 0 :::5901 :::* LISTEN 2520/Xvnc
tcp6 0 0 :::6001 :::* LISTEN 2520/Xvnc
$ systemctl status vncserver@:1.service
● vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: disabled)
Active: active (running) since Tue 2018-02-06 19:30:01 EST; 4s ago
The vnc user is configured and password set per these instructions. There is also a view-only password configured.
The firewall (iptables) allows the respective ports through for single client connection:
-A INPUT -p tcp -m tcp --dport 5901 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 6001 -j ACCEPT
I have tried different connection variations in the VNC server address:
- vnc_ip_address:1 (1 being the display_number)
- vnc_ip_address
- vnc_ip_address::5901 and 6001
Yet the TigerVNC viewer 1.8.0 always errors when attempting to connect:
I am running the TigerVNC viewer for Mac OS (Sierra). The server is online and available for other services like https.
What am I missing or not understanding?
You say you have an "instance", which most likely means you're running RHEL on a cloud provider such as Amazon AWS or Google Cloud Platform. In this case, in addition to opening the firewall port within the instance, you also need to open the port in the external firewall provided by the cloud platform, such as an Amazon EC2 security group or Google cloud firewall.