一、查看firewall以及firewall服务的状态。

# 查看firewall服务状态
systemctl status firewalld
# 查看firewall状态
firewall-cmd --state

二、开启,关闭,重启firewall服务状态

# 开启
service firewalld start
# 重启
service firewalld restart
# 关闭
service firewalld stop

三、重启防火墙

#修改设置后要重启防火墙
firewall-cmd --reload

四、查询、开放、关闭端口

# 查询端口是否开放
firewall-cmd --query-port=80/tcp
# 开放80端口
firewall-cmd --permanent --add-port=80/tcp
# 移除端口
firewall-cmd --permanent --remove-port=80/tcp

# 查看防火墙的开放的端口
firewall-cmd --permanent --list-ports
# 查看防火墙规则
firewall-cmd --list-all

CentOS7.2防火墙配置的更多相关文章

  1. centos7的防火墙配置

    centos7 不在使用iptables作为防火墙, 而是使用firewalld规则, 好吃是支持动态更新, 不需要重启服务, 第二个就是加入了zone概念. 所以和centos6在防火墙配置上有很大 ...

  2. CentOS7 Firewall防火墙配置用法详解

    centos 7中防火墙是一个非常的强大的功能了,但对于centos 7中在防火墙中进行了升级了,下面我们一起来详细的看看关于centos 7中防火墙使用方法.   FirewallD 提供了支持网络 ...

  3. 【转载】centos7.3 防火墙配置

    firewalld介绍原文:https://www.cnblogs.com/moxiaoan/p/5683743.html 一. centos7 默认有一个防火墙 firewalld,具体使用如下: ...

  4. linux(centos7)防火墙配置firewalld和iptables

    linux系统中防火墙管理有2种方式,分别是iptables和firewalld(centos7.x),下面介绍centos7的配置方法 一.firewalld: 因为cenos7默认使用firewa ...

  5. Centos7.3防火墙配置

    1.查看firewall服务状态 systemctl status firewalld 2.查看firewall的状态 firewall-cmd --state 3.开启.重启.关闭.firewall ...

  6. CentOS7 firewall防火墙配置笔记

    开启端口 # firewall-cmd --zone=public --add-port=/tcp --permanent 命令含义:         --zone #作用域         --ad ...

  7. CentOS7 中防火墙配置

    systemctl  stop firewalld.service  #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 开 ...

  8. Centos7.4 防火墙配置

    # service firewalld status; #查看防火墙状态 (disabled 表明 已经禁止开启启动 enable 表示开机自启,inactive 表示防火墙关闭状态 activate ...

  9. Centos7 Firewall 防火墙配置应用实例参考(转)

    时间:2016-06-02 02:40来源:linux.it.net.cn 作者:IT   简单的配置,参考学习:--permanent  当设定永久状态时 在命令开头或者结尾处加入此参数,否则重载或 ...

随机推荐

  1. Django2.2中间件详解

    中间件是 Django 用来处理请求和响应的钩子框架.它是一个轻量级的.底层级的"插件"系统,用于全局性地控制Django 的输入或输出,可以理解为内置的app或者小框架. 在dj ...

  2. 二、Ansible的Ad-hoc介绍篇

    一.什么是Ad-hoc 称为临时命令,简单说,就是在命令行界面,直接通过一条ansible命令,去指定主机执行指定指令,功能有限 例如:ansible localhost -m command -a ...

  3. AQS源码解析(一)-AtomicBoolean源码解析

    基本类: AtomicInteger AtomicLong AtomicBoolean 数组类型: AtomicIntegerArray AtomicLongArray AtomicReference ...

  4. 一句道破所有的springmvc(面试必备)

    springmvc流程 : URL--------前端控制器DispatcherServlet---------HandlerMapping处理器映射器-------调用HandlerAdapter处 ...

  5. C++责任链

    #include <iostream> using namespace std; class Base{ protected: Base *next; public: Base(Base ...

  6. 章节十六、4-TestNG高级功能--把测试方法分优先级、分组执行

    一. 把测试方法分优先级执行----->(priority=索引) 1.新建一个testng方法 package testclasses; import org.testng.annotatio ...

  7. unity编辑器扩展_01(在工具栏中创建一个按钮)

    代码: [MenuItem("Tools/Test",false,1)]    static void Test()    {        Debug.Log("tes ...

  8. 17_defer(延迟调用)关键字的使用

    1.defer是延迟调用关键字,只能在函数内部使用 2.总是在main函数结束前调用(和init用法相对) 3.如果有多个defer 遵循先进后出的原则 4.和匿名函数同时使用时,如果匿名函数带有参数 ...

  9. Socket I/O模型之select模型

    socket网络编程中有多种常见的I/O模型: 1.blocking阻塞 2.nonblocking非阻塞 3.I/O multiplexing复用 4.signal driven 5.asynchr ...

  10. 大型互联网公司分布式ID方案总结

    ID是数据的唯一标识,传统的做法是利用UUID和数据库的自增ID,在互联网企业中,大部分公司使用的都是Mysql,并且因为需要事务支持,所以通常会使用Innodb存储引擎,UUID太长以及无序,所以并 ...