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. JavaSE--Java 的基本程序设计结构

    Java 对大小写敏感 Java 中定义类名的规则很宽松.名字必须以字母开头,后面可以跟字母和数字的任意组合.长度基本上没有限制.但是不能使用 Java 保留字作为类名. 标准的命名规范为:类名是以大 ...

  2. Collection接口介绍

    Collection接口介绍 一个Collection代表一组对象,是集合体系中的根接口.一些允许有重复的元素一些不允许,一些有顺序一些没有顺序.JDK不提供此接口具体类的直接实现,只会有子接口和抽象 ...

  3. LibraryBuilder——从元器件datasheet到Library

    LibraryBuilder是Cadence推出的元件库管理工具,可以从PDF自动创建器件的原理图符号及PCB封装. 软件可以从“吴川斌的博客”下载到. 这里大致记录一下创建元件库的过程,以Beagl ...

  4. python学习笔记(29)-操作excel

    操作excel #存到excel里面,python去操作excel文件 #只支持这种后缀,xlsx ,openpyxl只支持这种格式 # from openpyxl import load_workb ...

  5. idea 为模块添加Tomcat依赖 解决: Intelij IDEA 创建WEB项目时没有Servlet的jar包

    解决: Intelij IDEA 创建WEB项目时没有Servlet的jar包 今天创建SpringMVC项目时 用到HttpServletRequest时, 发现项目中根本没有Servlet这个包, ...

  6. B-Tree(B树)原理及C++代码实现

    B树是一种平衡搜索树,它可以看做是2-3Tree和2-3-4Tree的一种推广.CLRS上介绍了B树目前主要针对磁盘等直接存取的辅存设备,许多数据库系统也利用B树或B树的变种来存储信息. 本文主要针对 ...

  7. 如何编译(helloworld)可以在开发板上运行的应用

    本节介绍如何编译可以在开发板上运行的应用,编译方法很简单.基于:iTOP4412开发板首先要确定一下环境变量,如下图所示,使用“cd”命令回到根目录,然后使用命令“vim .bashrc”打开环境变量 ...

  8. 53)PHP,类的继承

    详见   视频第十七天  中的第二节 类的继承 所以   类之间的继承就是一种新的关系的建立,并不是将父类的东西重新复制给子类--------------------- 当你实例化一个类的时候,调用它 ...

  9. 利用Python暴力爆破PDF密码

    一个简单的Python脚本,可用于暴力破解受密码保护的PDF文件的密码脚本已在使用128位RC4(大多数信用卡对帐单)加密的PDF上进行了测试,成功率为100% pasword='<passwo ...

  10. 染色dp(确定一行就可行)

    题:https://codeforces.com/contest/1027/problem/E 题意:给定n*n的方格,可以染黑白,要求相邻俩行”完全“不同或完全相同,对于列也是一样.然后限制不能拥有 ...