you need a rule such as
$IPTABLES -A INPUT -p tcp -d <linuxmachine> --destination-port 5901 -m state --state NEW -j ACCEPT
(all one line)
and something like
$IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT $IPTABLES -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT $IPTABLES -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
where $IPTABLES is the path to the iptables binary.
Well...
I tried to do those four commands, but it didn't work. When I tried to connect via my VNC client it said connection refused. :( Does the iptables command change/write to the /etc/sysconfig/iptables file? Isn't this what defines what comes in and out? Sorry if my questions are so basic; this is far outside my area of expertise.
Thanks,
Jeremy