Source From Here
Question
How do I configure Linux system firewall to allow incoming VNC connections?
How-To
VNC server listens on the following TCP ports:
In other words a VNC server listens for a VNC client on TCP ports 5800+N, 5900+N, and 6000+N where N is the display which starts at zero. So,
Find Out VNC Port
Type the following command:
Update /etc/sysconfig/iptables
Edit /etc/sysconfig/iptables file:
Save and close the file. Restart iptables:
A Note About Other Linux Distributions
/etc/sysconfig/iptables works only on RHEL / CentOS / Fedora Linux. For other distros update your iptables shell script as follows:
Question
How do I configure Linux system firewall to allow incoming VNC connections?
How-To
VNC server listens on the following TCP ports:
In other words a VNC server listens for a VNC client on TCP ports 5800+N, 5900+N, and 6000+N where N is the display which starts at zero. So,
Find Out VNC Port
Type the following command:
Update /etc/sysconfig/iptables
Edit /etc/sysconfig/iptables file:
- ...
- -A INPUT -p tcp -m state --state NEW -m tcp --dport 5801 -j ACCEPT
- -A INPUT -p tcp -m state --state NEW -m tcp --dport 5901 -j ACCEPT
- -A INPUT -p tcp -m state --state NEW -m tcp --dport 6001 -j ACCEPT
A Note About Other Linux Distributions
/etc/sysconfig/iptables works only on RHEL / CentOS / Fedora Linux. For other distros update your iptables shell script as follows:
沒有留言:
張貼留言