zoukankan      html  css  js  c++  java
  • linux如何关闭防火墙

    1) 重启后生效 
    开启: chkconfig iptables on
    关闭: chkconfig iptables off

    2) 即时生效,重启后失效
    开启: service iptables start
    关闭: service iptables stop

    需要说明的是对于Linux下的其它服务都可以用以上命令执行开启和关闭操作。

    在开启了防火墙时,做如下设置,开启相关端口,
    修改/etc/sysconfig/iptables 文件,添加以下内容:
    -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
    -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
  • 相关阅读:
    HDU 6043
    HDU 6033
    HDU 6041
    HDU 6050
    HDU 6053
    HDU 6055
    HDU 6045
    HDU 6044
    HDU 6040
    ZUFE 1035 字符宽度编码(字符串)
  • 原文地址:https://www.cnblogs.com/mophy/p/6953272.html
Copyright © 2011-2022 走看看