参考原文链接: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. java 数组中的方法

    //要import java.util.Arrays: fill(int[] a,int value);//对a数组进行全部用value填充 fill(int[] a,int fromIndex,in ...

  2. 第十七节,OpenCV(学习六)图像轮廓检测

    1.检测轮廓 轮廓检测是图像处理中经常用到的,OpenCV-Python接口中使用cv2.findContours()函数查找检测物体的轮廓. cv2.findContours(image, mode ...

  3. 20175204 张湲祯 2018-2019-2《Java程序设计》2

    20175204 张湲祯 2018-2019-2<Java程序设计>2 必做课下作业MyCP 要求 编写MyCP.java 实现类似Linux下cp XXX1 XXX2的功能,要求MyCP ...

  4. codeforces 343D 树剖后odt维护

    子树修改+路径修改+单点查询 树链剖分+区间维护即可 由于只有单点查询,我直接用了odt,复杂度还行 #include<bits/stdc++.h> #define endl '\n' # ...

  5. Gitlab_ansible_jenkins三剑客⑤jenkins Pipeline-job的使用

    Pipeline-job的使用 创建Pipeline任务 找到root用户的id 编写pipeline脚本 #!groovy pipeline{ agent {node {label 'master' ...

  6. 简单的C#网络爬虫

    Source Code: http://download.csdn.net/download/qdalong/10271880 这是爬取网页内容,像是这对大家来说都是不难得,但是在这里有一些小改动,代 ...

  7. Python爬虫基础之lxml

    一.Python lxml的基本应用 <html> <head> <title> The Dormouse's story </title> </ ...

  8. Centos7安装JDK+部署Tomcat8

    Centos7下JDK+Tomcat的部署: 1.安装JDK 1.1 通过以下命令获得java JDK列表 yum -y list java* 1.2 通过yum安装JDK yum -y instal ...

  9. 初学ASP.NET 知识点

    1.C# 中的虚方法 和 C++中的作用一致,能让指向子类的父类指针优先到子类中寻找方法,而不是直接调用父类中的方法. 看一段例子回忆下: namespace ConsoleApplication1 ...

  10. 初学python之路-day06

    每天一篇总结,今天学习了大概有深浅拷贝,元组类型,字典类型与集合类型.第一次感觉有点难度,需要花费多点时间来掌握. 深浅拷贝,分为值拷贝.浅拷贝.深拷贝. ls = [1, 'abc', [10]] ...