The description of issue:
通过zookeeper连接服务器,连接不上,最终发现是端口不允许访问
Simple and easy way
Linux防火墙(Iptables)重启系统生效
开启: chkconfig iptables on
关闭: chkconfig iptables offLinux防火墙(Iptables) 即时生效,重启后失效
开启: service iptables start
关闭: service iptables stop
Allow port to visit by the remote client
cat /etc/sysconfig/iptables
vi /etc/sysconfig/iptables
iptables --list
service iptables restart
When restart is not ok,maybe add sudo
Delete rule
iptables -L INPUT -n --line-numbers ,通过命令iptables -L也可以查看,本例开通了
iptables -D input {line-numbers}