• 3、centos6.*与centos7.*防火墙操作命令


    一、防火墙状态

    1、centos6.*查看防火墙状态

    ~]# service iptables status

    2、centos7.*查看防火墙状态

    ~]# systemctl status firewalld
    

      

    二、临时关闭或开启防火墙

    1、centos6.*开启与关闭防火墙

    ~]# service iptables start          开启防火墙
    ~]# service iptables stop           关闭防火墙

    2、centos7.*开启与关闭防火墙

    ~]# systemctl start firewalld       启用防火墙
    ~]# systemctl stop firewalld        关闭防火墙

    说明:重启失效

    三、永久关闭或开启防火墙

    1、centos6.*开机禁用或启用防火墙

    ~]# chkconfig iptables off        永久关闭防火墙
    ~]# chkconfig iptables on         永久关闭后启用

    2、centos7.*开启禁用或启用防火墙

    ~]# systemctl disable firewalld              开机禁用防火墙
    ~]# systemctl enable firewalld               开机启用防火墙
    ~]# systemctl is-enabled firewalld.service   查看防火墙是否开机启动
    ~]# systemctl list-unit-files|grep enabled   查看系统开机启动的服务列表
  • 相关阅读:
    iOS7 自己定义动画跳转
    Android开发之用双缓冲技术绘图
    postgres 使用存储过程批量插入数据
    渗透过程
    python pytesseract使用
    排序算法比较
    python算法
    python中PIL模块
    数字电路复习
    windows服务参考
  • 原文地址:https://www.cnblogs.com/qcbfj/p/10007455.html
Copyright © 2020-2023  润新知