zoukankan      html  css  js  c++  java
  • Linux iptables开放特定端口

    如果系统已安装则调过安装步骤

    查找安装包

    yum list  grep iptables


    安装iptables

    yum  install iptables-services


    重启防火墙使配置文件生效

    systemctl restart iptables.service


    设置iptables防火墙为开机启动项

    systemctl  enable iptables.service


    查看激活状态

    systemctl status iptables.service


    查看本机IPTABLES的设置情况

    iptables -nL



    开放端口,编辑配置

    vim  /etc/sysconfig/iptables


    添加

    -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


    重启即可

    启动指令:service iptables start
    重启指令:service iptables restart
    关闭指令:service iptables stop

    https://blog.csdn.net/u011019141/article/details/78872468?utm_source=copy

  • 相关阅读:
    Webpack
    django 基础入门(二)
    django 基础入门(一)
    jQuery(二)
    JavaScripts+jquery
    html(第一天,div+css)
    SqlAlchemy ORM
    redis总结
    memcached总结
    Python (九) 协程以及数据库操作
  • 原文地址:https://www.cnblogs.com/lxwphp/p/15453904.html
Copyright © 2011-2022 走看看