firewalld的基本使用

启动: systemctl start firewalld

关闭: systemctl stop firewalld

查看状态: systemctl status firewalld

开机禁用  : systemctl disable firewalld

开机启用  : systemctl enable firewalld

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

配置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
 
 
转自:https://www.cnblogs.com/moxiaoan/p/5683743.html
 
 
 

CentOS7使用firewalld管理防火墙与端口的更多相关文章

  1. CentOS7使用firewalld管理防火墙

    firewalld的基本使用 #启动 systemctl start firewalld #关闭 systemctl stop firewalld #查看状态 systemctl status fir ...

  2. CentOS 使用firewalld打开防火墙与端口

    CentOS 使用firewalld打开防火墙与端口 LinuxCentOS 基本使用 启动 : systemctl start firewalld 关闭 : systemctl stop firew ...

  3. Centos7管理selinux及使用firewalld管理防火墙

    CentOS 7.0默认使用的是firewall作为防火墙 1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status ...

  4. Linux学习笔记之CentOS 7系统使用firewalld管理防火墙端口

    0x00 firewalld的基本使用 # 启动: systemctl start firewalld # 查看状态: systemctl status firewalld # 停止: systemc ...

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

    systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体. 启动一个服务:systemctl start firewalld.servic ...

  6. Centos7 使用firewall管理防火墙

    一.Centos7使用firewall的管理防火墙 1.firewalld基本使用 启动:systemctl start firewalld 关闭:systemctl stop firewalld 状 ...

  7. firewalld管理防火墙常用命令

    1.查看防火墙的状态 [root@localhost HMK]# firewall-cmd --state 查看防火墙的运行状态 not running [root@localhost HMK]# s ...

  8. CentOS7.3 下开放防火墙的端口

    CentOS 7.3默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1:关闭firewall: systemctl stop firewalld.service system ...

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

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

随机推荐

  1. 初识API网关,API-gateway

    1.API-gateway(含义) 所有API的调用统一接入API网关层,由网关层负责接入和输出. API Gateway是一个服务器,也可以说是进入系统的唯一节点.这跟面向对象设计模式中的Facad ...

  2. 887C. Slava and tanks#轰炸弹坦克游戏(分析)

    题目出处:http://codeforces.com/problemset/problem/877/C 题目大意:按照游戏规则,求最小炸弹使用次数 #include<iostream> u ...

  3. 远程调用shell脚本文件和远程复制文件

    1.安装sshpass yum install sshpass 2.本地调用远程服务器的shell脚本文件: sshpass -p sa ssh root@192.168.56.105 -C &quo ...

  4. 吴裕雄--天生自然 JAVA开发学习:封装

    public class Person { private String name; private int age; } public class Person{ private String na ...

  5. Qt QPixmap QImage 图片等比例缩放到指定大小

    QPixmap pixmap(path); //pixmap=QPixmap::fromImage(imgShow); pixmap = pixmap.scaled(, , Qt::KeepAspec ...

  6. istio介绍

    核心架构 解决的问题 故障排查 1.  这个请求在哪里失败了?A有调用B吗? 2.  为什么用户的请求/页面hung住了? 3.  为什么系统这么慢?那个组件最慢? 应用容错性 1.  客户端没有配置 ...

  7. [原]UEFI+GPT启动VHD

    1. 缘起 2. 创建VHD文件并写入系统镜像到VHD文件 2.1 制作VHD文件 2.1.1 纯界面创建 2.1.2 命令行创建 2.2 把系统镜像写入VHD文件 3. 添加VHD文件到系统引导 3 ...

  8. c++ 装饰器模式/包装模式

    理解 使用两个隔离又继承自统一接口类的对象:方法对象(抽象/具体), 包装器对象(抽象/具体)实现多种组合只需要 n + m种实现, 而对比直接继承,则需要n*m 种实现,因此在面对多种具体类和多种额 ...

  9. 关于XML的一些总结

    xml的知识结构图 eXtensible Markup Language,可扩展标记语言,简称XML,和HTML比较而言,语法相似,作用不同 XML被设计用来存储和传输数据,但存储数据方面,数据库是主 ...

  10. 【Java杂货铺】JVM#Class类结构

    代码编译的结果从本地机器码转为字节码,是储存格式发展的一小步,却是编程语言的一大步.--<深入理解Java虚拟机> 计算机只认识0和1.所以我们写的编程语言只有转义成二进制本地机器码才能让 ...