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:
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 INPUT寫在一起
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:
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:
沒有留言:
張貼留言