CentOS7使用firewalld管理防火墙与端口
firewalld的基本使用
启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld
开机禁用 : systemctl disable 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 --zone=public --add-port=80/tcp --permanent (--permanent永久生效,没有此参数重启后失效)
重新载入:
firewall-cmd --reload
查看:
firewall-cmd --zone= public --query-port=80/tcp
删除:
CentOS7使用firewalld管理防火墙与端口的更多相关文章
- CentOS7使用firewalld管理防火墙
firewalld的基本使用 #启动 systemctl start firewalld #关闭 systemctl stop firewalld #查看状态 systemctl status fir ...
- CentOS 使用firewalld打开防火墙与端口
CentOS 使用firewalld打开防火墙与端口 LinuxCentOS 基本使用 启动 : systemctl start firewalld 关闭 : systemctl stop firew ...
- Centos7管理selinux及使用firewalld管理防火墙
CentOS 7.0默认使用的是firewall作为防火墙 1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status ...
- Linux学习笔记之CentOS 7系统使用firewalld管理防火墙端口
0x00 firewalld的基本使用 # 启动: systemctl start firewalld # 查看状态: systemctl status firewalld # 停止: systemc ...
- CentOS7使用打开关闭防火墙与端口
systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体. 启动一个服务:systemctl start firewalld.servic ...
- Centos7 使用firewall管理防火墙
一.Centos7使用firewall的管理防火墙 1.firewalld基本使用 启动:systemctl start firewalld 关闭:systemctl stop firewalld 状 ...
- firewalld管理防火墙常用命令
1.查看防火墙的状态 [root@localhost HMK]# firewall-cmd --state 查看防火墙的运行状态 not running [root@localhost HMK]# s ...
- CentOS7.3 下开放防火墙的端口
CentOS 7.3默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1:关闭firewall: systemctl stop firewalld.service system ...
- CentOS7使用firewalld打开关闭防火墙与端口(转载)
1.firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disabl ...
随机推荐
- 利用tensorflow编写自己的机器学习模型主要步骤
利用tensorlow编写自己的机器学习模型主要分为两个阶段: 第一阶段:建立模型或者建立网络结构 1.定义输入和输出所需要的占位符 2.定义权重 3.定义具体的模型接口 4.定义损失函数 5.定义优 ...
- 4.windows-oracle实战第四课 -表的查询
所有语句均为安装oracle数据库后scott的默认表emp,dept等表 1.自己插入自己:insert into 表名 (字段)select *from 表名 2.去除重复行: select di ...
- jexus+.netcore+identityserver4 部署支持ssl(https)
硬件环境: 在阿里云购买了一个centos 7 64 位服务器 软件: jexus ,dotnet core sdk 第一步安装dotnet core sdk: 先安装dotnet core sdk ...
- 使用DataSnap Server环境搭建注意的问题。
1.Data exploer 的MYSQL文件(Libmysql.dll)放到系统的system32目录即可
- regex(python)
正则表达式 #!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/7/26 16:39 # @Author : jackendoff ...
- 900A. Find Extra One#寻找与众不同的它(计数)
题目出处:http://codeforces.com/problemset/problem/900/A 题目大意:问删除一个点后,剩下的点能不能都在Y轴的同一边 #include<iostrea ...
- [JSOI2019]精准预测(2-SAT+拓扑排序+bitset)
设第i个人在t时刻生/死为(x,0/1,t),然后显然能够连上(x,0,t)->(x,0,t-1),(x,1,t)->(x,1,t+1),然后对于每个限制,用朴素的2-SAT连边即可. 但 ...
- centos mysql无法删除数据库
系统版本是CentOS Linux release 7.4.1708 (Core) 数据库版本mysql Ver 14.14 Distrib 5.6.39 在执行drop database ga-s ...
- 启动查看crontab日志服务
方法1: . 修改rsyslog文件,将/etc/rsyslog.d/-default.conf 文件中的#cron.*前的#删掉: . 重启rsyslog服务service rsyslog rest ...
- mysql绿色版小白简易安装教程
第一步,解压并安装mysql 我们先解压整个安装包 然后进入解压后的安装包 复制安装包路径 然后按Windows键,打开"开始",输入cmd 接着以管理员方式打开cmd 如图 接着 ...