CentOS7使用firewalld管理防火墙
- firewalld的基本使用
#启动
systemctl start firewalld
#关闭
systemctl stop firewalld
#查看状态
systemctl status firewalld
#开机禁用
systemctl disable firewalld
#开机启用
systemctl enable firewalld
- 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
- firewalld对端口的管理
#添加
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
- systemctl使用
#启动一个服务
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
CentOS7使用firewalld管理防火墙的更多相关文章
- CentOS7使用firewalld管理防火墙与端口
firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status fir ...
- Centos7管理selinux及使用firewalld管理防火墙
CentOS 7.0默认使用的是firewall作为防火墙 1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status ...
- Centos7 使用firewall管理防火墙
一.Centos7使用firewall的管理防火墙 1.firewalld基本使用 启动:systemctl start firewalld 关闭:systemctl stop firewalld 状 ...
- Linux学习笔记之CentOS 7系统使用firewalld管理防火墙端口
0x00 firewalld的基本使用 # 启动: systemctl start firewalld # 查看状态: systemctl status firewalld # 停止: systemc ...
- firewalld管理防火墙常用命令
1.查看防火墙的状态 [root@localhost HMK]# firewall-cmd --state 查看防火墙的运行状态 not running [root@localhost HMK]# s ...
- CentOS7使用firewalld打开关闭防火墙与端口(转载)
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disabl ...
- CentOS7使用firewalld打开关闭防火墙与端口
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disab ...
- CentOS7 使用firewalld打开关闭防火墙与端口
1.firewalld的基本使用 启动: systemctl start firewalld 关闭: systemctl stop firewalld 查看状态: systemctl status f ...
- CentOS7使用firewalld防火墙配置端口
安装启用firewalld防火墙 CentOS7默认的防火墙是firewalld 如果没有firewalld防火墙,可以执行yum install firewalld 命令进行安装 firewalld ...
随机推荐
- 口罩预约管理系统——系统网站实现(前端+PHP+MySQL)
口罩预约管理系统网站实现 一.前言 二.系统登陆逻辑及界面实现 三.用户模块 1.用户预约系统界面 2.用户查看我的订单界面 3.用户修改预约信息 四.管理员模块 1.管理员登陆界面 2.查看用户预约 ...
- 【运维】Vmware虚拟机静态IP的设置
这几天学习大数据,搭建的集群服务器由于Vmware内部实现的虚拟网关,动态分配ip,使得每次ip更改后,均需要修改集群节点的每个hosts文件,不然集群间联系会出错,因此为了杜绝这个问题,这里修改集群 ...
- 在VS2019使用MASM编写汇编程序
具体的配置步骤可以参考: 汇编环境搭建 Windows10 VS2019 MASM32 本文主要是入门向的教程,VS2019中要调用C语言函数需要加上 includelib ucrt.lib incl ...
- Redis学习(三)java使用redis
一.操作步骤 Redis除了命令行操作以外,还可以通过java代码进行操作,流程如下: 下载Jedis依赖包,并丢入工程中合适的位置 在Maven中引入redis的包 <!--引入redis包- ...
- 使用Navicat连接MySQL8.0版本报1251错误
出现1251错误是因为,MySQL8.0版本改变了密码的验证规则caching_sha2_password,MySQL之前的版本验证规则是mysql_native_password,现在需要修改MyS ...
- Docker 容器化部署 Python 应用
Docker 是一个开源项目,为开发人员和系统管理员提供了一个开放平台,可以将应用程序构建.打包为一个轻量级容器,并在任何地方运行.Docker 会在软件容器中自动部署应用程序. 在本篇中,我将介绍如 ...
- 搭建Linux服务器
工欲善其事必先利其器, 虚拟机:百度云链接地址:https://pan.baidu.com/s/1_nWQh3WKF7xLs5-nmbZ8lA (Vmware 12 ) Linux 7:百度云链接 ...
- TypeScript实现设计模式——生成器模式
生成器模式是一种在TypeScript/JavaScript中非常常见的创建型设计模式,它使你能够分步骤创建复杂对象.当你需要创建一个可能有许多配置选项的对象时, 该模式会特别有用. 问题 假设我们需 ...
- layui动态添加选项卡
<!DOCTYPE html><html xmlns:th="http://www.thymeleaf.org"><head> <meta ...
- Python-local variable 'raw_password' referenced before assignment
where? 执行Python程序的时候,报这个错 why? 变量作用域问题,在分支中定义的变量,当满足条件的时候则可以正确得到变量,当不满足条件的时候则报这个错 way? 把变量从分支中抽离到分支上 ...