Here is a checklist of access controls that can prevent successfull VNC sessions:
1. Make sure your router firewall allows VNC. Specifically, it should open the ports 5800, 5900. If your VNC display is on :1, you should also open ports 5801 & 5901. Similarly, if your display is on port :2, you should open 5802 & 5902, and so on.
1b. If you have NAT running on the router, make sure it directs the VNC traffic to the appropriate local address!
2. Make sure your Xwindows has access opened on those displays. To find out, do:
> xauth list
If you dont see your display listed, do:
> xauth add <hostname:display> . `m`
3. Make sure your Linux firewall has those ports open (5800, 5900, 5801, 5901, 5802, 5902, etc). This can be done through the Gnome GUI as follows:
- Go to System->Administration->Security Level and Firewall
(To get the System menu, you will need to add the "Menu Bar" to your panel)
4. Make sure your /etc/hosts.deny & /etc/hosts.allow files allow the external VNC user to connect
5. Make sure your /etc/sysconfig/vncservers file has displays setup for appropriate users
6. If you have NAT running on the router, make sure that the external machine you are running the VNC client on, uses the EXTERNAL IP address of the linux machine on which your VNC server is running!
To find the external IP address of your linux machine, point your webbrowser (on the linux machine) to myipaddress.com
7. Finally, note that you can point your web browser (on your linux machine) to the following website to check if your VNC server is accessible from the external world: www.gotomyvnc.com