美文网首页
Linux firewall iptables

Linux firewall iptables

作者: 2020同舟共济 | 来源:发表于2016-12-08 18:27 被阅读0次

The description of issue:

通过zookeeper连接服务器,连接不上,最终发现是端口不允许访问

Simple and easy way

  1. Linux防火墙(Iptables)重启系统生效
    开启: chkconfig iptables on
    关闭: chkconfig iptables off

  2. Linux防火墙(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}

直接编辑iptables

官方文档
参考笔记

相关文章

网友评论

      本文标题:Linux firewall iptables

      本文链接:https://www.haomeiwen.com/subject/hlusmttx.html