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=/tcp --permanent    (--permanent永久生效,没有此参数重启后失效)
重新载入
firewall-cmd --reload
查看
firewall-cmd --zone= public --query-port=/tcp
删除
firewall-cmd --zone= public --remove-port=/tcp --permanent

CentOS7使用打开关闭防火墙与端口的更多相关文章

  1. CentOS7 firewalld打开关闭防火墙 开放端口

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

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

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

  3. 关于学习CentOS7使用firewalld打开关闭防火墙和端口

    1.firewalld简介 firewalld是centos7的一大特点,主要有两个优点:一是支持动态更新,不需要重启服务:二就是加入了防火墙的“zone”概念. firewalld有图形界面和工具界 ...

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

    CentOS7使用firewalld打开关闭防火墙与端口       1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop ...

  5. CentOS7使用httpd apache 和firewalld打开关闭防火墙与端口

    Centos7 使用systemctl 工具操作命令 systemctl 是Centos7的服务管理工具中的主要工具 ,它融合之前service和chkconfig的功能于一体 一.httpd的设置 ...

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

    http://blog.csdn.net/huxu981598436/article/details/54864260 开启端口命令 输入firewall-cmd --query-port=6379/ ...

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

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

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

    1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status f ...

  9. CentOS7 使用firewalld打开关闭防火墙以及端口

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

随机推荐

  1. bartender学习

    参考: 官网  https://www.seagullscientific.com/label-software/barcode-label-design-and-printing 文章 http:/ ...

  2. 雷林鹏分享:C# 枚举(Enum)

    C# 枚举(Enum) 枚举是一组命名整型常量.枚举类型是使用 enum 关键字声明的. C# 枚举是值数据类型.换句话说,枚举包含自己的值,且不能继承或传递继承. 声明 enum 变量 声明枚举的一 ...

  3. 雷林鹏分享:C# 索引器(Indexer)

    C# 索引器(Indexer) 索引器(Indexer) 允许一个对象可以像数组一样被索引.当您为类定义一个索引器时,该类的行为就会像一个 虚拟数组(virtual array) 一样.您可以使用数组 ...

  4. English trip -- Phonics 6 元音字母 u + Unit 5 B课 review

    Vowel  u [ʌ]  闭音节 bunny cut bug mushroom lunch ar er ur or ir = R (读音类似儿) e.g. dollar  美元 collar  n. ...

  5. python 在 Windows Server 2008 r2 上 安装失败

    Microsoft Visual C++ 2008 Redistributable Package link (x86): https://www.microsoft.com/en-us/downlo ...

  6. Confluence 6 使用 LDAP 授权连接一个内部目录概述

    你可以为你的 Confluence 连接 LDAP 服务器使用使用委托认证.这个意思是 Confluence 将会设置一个内部目录,这个目录仅被用来处理 LDAP 的授权. 这个设置将会为尝试登录系统 ...

  7. CF1082G Petya and Graph

    题意 定义图权 = 图中边权总和 - 图中点权总和(空图的图权=0),求 n 个点 m 条边的无向图最大权子图. 把边看成点,这个点与两个原图中的点连边.直接最小割求最大闭合子图即可.

  8. splay训练

    1, CF 455D 2, CF 420D 3, CF 414E

  9. 『cs231n』线性分类器损失函数

    代码部分 SVM损失函数 & SoftMax损失函数: 注意一下softmax损失的用法: SVM损失函数: import numpy as np def L_i(x, y, W): ''' ...

  10. python 爬取妹子图

    作为一个python还没入门的小白,搞懂这段代码实在是很不容易,还要去学html的知识(#黑脸) 因此我加上了注释,比较好读懂点 #coding=utf-8 import time import re ...