Allow VNC through the iptables firewall

# /sbin/iptables -A INPUT -p tcp -m tcp –dport 5900 -j ACCEPT
# /sbin/iptables -A INPUT -p udp -m udp –dport 5900 -j ACCEPT
# /etc/init.d/iptables save
# /etc/init.d/iptables restart

This will now allow the port 5900 connections through the firewall.

/etc/sysconfig/iptables is the configuration file where the rulesets are saved.

You can also restrict access to the 5900 port from a particular address only. This is a safer choice.

Use shields up to test if the port can be accessed from outside your network.