美文网首页
iptables install

iptables install

作者: xun2019 | 来源:发表于2018-03-27 20:38 被阅读0次

    https://blog.csdn.net/piaocoder/article/details/53887933

    关闭fireware

    ···
    systemctl status firewalld.service #检测是否开启了firewall

    systemctl stop firewalld.service #关闭firewall

    sytsemctl disable firewalld.service #禁止firewall开机自启

    *filter

    :INPUT ACCEPT [0:0]

    :FORWARD ACCEPT [0:0]

    :OUTPUT ACCEPT [0:0]

    -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

    -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT

    -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT

    -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT

    -A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT

    -A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT

    -A INPUT -j REJECT --reject-with icmp-host-prohibited

    -A FORWARD -j REJECT --reject-with icmp-host-prohibited

    COMMIT

    ---------------------

    作者:piaocoder

    来源:CSDN

    原文:https://blog.csdn.net/piaocoder/article/details/53887933

    版权声明:本文为博主原创文章,转载请附上博文链接!

    相关文章

      网友评论

          本文标题:iptables install

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