参考原文链接:https://www.cnblogs.com/moxiaoan/p/5683743.html
1、firewalld的基本使用
启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld 
开机禁用  : systemctl disable firewalld
开机启用  : systemctl enable firewalld
2.systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体。

启动一个服务:systemctl start firewalld.service
关闭一个服务:systemctl stop firewalld.service
重启一个服务:systemctl restart firewalld.service
显示一个服务的状态:systemctl status firewalld.service
在开机时启用一个服务:systemctl enable firewalld.service
在开机时禁用一个服务:systemctl disable firewalld.service
查看服务是否开机启动:systemctl is-enabled firewalld.service
查看已启动的服务列表:systemctl list-unit-files|grep enabled
查看启动失败的服务列表:systemctl --failed

3.配置firewalld-cmd

查看版本: firewall-cmd --version
查看帮助: firewall-cmd --help
显示状态: firewall-cmd --state
查看所有打开的端口: firewall-cmd --zone=public --list-ports
更新防火墙规则: firewall-cmd --reload
查看区域信息:  firewall-cmd --get-active-zones
查看指定接口所属区域: firewall-cmd --get-zone-of-interface=eth0
拒绝所有包:firewall-cmd --panic-on
取消拒绝状态: firewall-cmd --panic-off
查看是否拒绝: firewall-cmd --query-panic
开启一个端口
添加
firewall-cmd --zone=public --add-port=80/tcp --permanent    (--permanent永久生效,没有此参数重启后失效)
重新载入
firewall-cmd --reload
查看
firewall-cmd --zone= public --query-port=80/tcp
删除
firewall-cmd --zone= public --remove-port=80/tcp --permanent

firewalld的基本使用的更多相关文章

  1. CentOS7使用firewalld打开关闭防火墙与端口(转载)

    1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disabl ...

  2. CentOS7使用firewalld打开关闭防火墙与端口

    1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld  停止: systemctl disab ...

  3. linux系统的初化始配置(包括网络,主机名,关闭firewalld与selinux)

    每次我们使用Linux都会对系统进行初始化的配置,下面我们一一列出来. 1.服务的开启 systemctl enable firewalld.service //将指定的服务设置为开机启动 syste ...

  4. Centos7的firewalld配置

    红帽官方的使用文档: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Gu ...

  5. Linux防火墙配置(iptables, firewalld)

    netfilter和底层实现 iptables firealld Linux中的防火墙 RHEL中有几种防火墙共存: iptables firewalld ip6tables ebtables 这些软 ...

  6. centos7 firewalld

    1.firewalld简介 firewalld是centos7的一大特性,最大的好处有两个: 1.支持动态更新,不用重启服务: 2.加入了防火墙的"zone"概念   firewa ...

  7. centos7 开启防火墙端口 firewalld

    systemctl start firewalld firewall-cmd --zone=public --add-port=3306/tcp --permanent firewall-cmd -- ...

  8. 关于firewalld防火墙的使用

    要想使用该防火墙,应该需要安装 networkmanager 并启动其服务.因为之前使用的是 netctl 提供的wifi-menu 来连接无线网络,导致安装networkmanager之后启动 Ne ...

  9. Centos7 关闭防火墙(Firewalld ),使用防火墙(iptables)

    1.直接关闭防火墙 systemctl stop firewalld.service: #停止firewall systemctl disable firewalld.service: #禁止fire ...

  10. Linux系统的初化始配置(包括配置网络,修改主机名,关闭firewalld与selinux的生效)

    一.配置网络环境 1.运行 cmd 查看本机的ip地址,然后记录下来. 2.网络和共享中心--本地连接属性如下: 手工配置到本地连接上面 IP:172.16.191.215,DNS:101.7.8.9 ...

随机推荐

  1. Socket netty ...

    1.什么是Socket? Socket就是为网络服务提供的一种机制. 通讯的两端都有Sokcet 网络通讯其实就是Sokcet间的通讯 数据在两个Sokcet间通过IO传输. 2.TCP与UDP在概念 ...

  2. 问题:强制关闭Redis快照导致不能持久化

    运行Redis发生错误:"MISCONF Redis is configured to save RDB snapshots, but is currently not able to pe ...

  3. java实现二叉树的建立以及实现二叉查找树的查、插、删、遍历

    一.采用存储结构 1.顺序存储:采用数组,顺序存储适配于完全二叉树,对于非完全二叉树并不合适,主要体现在空间上的浪费,所以我们需要用到另一种存储方式——链式存储. 2.链式存储:数据data用键值对的 ...

  4. Python爬虫从入门到进阶(3)之requests的使用

    快速上手(官网地址:http://www.python-requests.org/en/master/user/quickstart/) 发送请求 首先导入Requests模块 import requ ...

  5. Depp Learning note Day1

    1.softmax函数的优化来防止溢出 2.np.argmax()函数的使用 返回值为数组中最大值的索引 a = [1, 2, 3, 4, 3, 7] print(np.argmax(a)) 若np. ...

  6. Recon ASRC Conference

    场景 ASRC漏洞挖掘 方法论 1.Brands https://www.crunchbase.com/ https://en.wikipedia.org Footers & about us ...

  7. MVC 前端页面ViewData参数名不区分大小写

    项目中实际应用: 后台赋值时传的是:ViewData["CheckedSystemMenu"], 前台取值时:ViewData["checkedsystemmenu&qu ...

  8. 如何用java实现一个p2p种子搜索(3)-dht协议实现

    dht协议实现 上一篇完成了路由表的实现,建立了路由表后,我们还要对路由表进行初始化,因为一开始路由表为空,所以我们需要借助一些知名的dht网络中的节点,对这些节点进行find_node,然后一步步初 ...

  9. 基于spark-streaming实时推荐系统

    基于spark-streaming实时推荐系统(一) 基于spark-streaming实时推荐系统( 二) 基于spark-streaming实时推荐系统(三)

  10. Linux 常用命令介绍

    介绍常用命令,在忘记时便于即使查询 复制.移动.删除     cp.mv.rm.pwd 1. CP 介绍 用法:CP [-adfilprsu]  源文件  目标文件 参数:参数说明: -a:是指arc ...