zoukankan      html  css  js  c++  java
  • centos6 centos6.8 centos7以下防火墙配置

    1、基本操作

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    # 查看防火墙状态
    service iptables status
     
    # 停止防火墙
    service iptables stop
     
    # 启动防火墙
    service iptables start
     
    # 重启防火墙
    service iptables restart
     
    # 永久关闭防火墙
    chkconfig iptables off
     
    # 永久关闭后重启
    chkconfig iptables on

      

    2、查看防火墙状态,防火墙处于开启状态并且只开放了22端口

    3、开启80端口

     vim /etc/sysconfig/iptables
    # 加入如下代码,比着两葫芦画瓢 :)
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

    保存退出后重启防火墙

    service iptables restart

  • 相关阅读:
    CCF201604试题
    CCF201512试题
    CCF201509试题
    CCF201509试题
    CCF201503试题
    CCF201503试题
    CCF201412试题
    CCF201412试题
    CCF201409试题
    CCF201409试题
  • 原文地址:https://www.cnblogs.com/delphixe/p/13796098.html
Copyright © 2011-2022 走看看