RedHat7系列(Centos/Debian) FireWall 防火墙 设置
RedHat 7 系列之后 系统把默认的iptables 换成了 Firewall 所以我们要适应 这个新的防火墙管理
-------------------服务相关-------------------
- 启动 : systemctl start firewalld.service
- 重启 : systemctl restart firewalld.service
- 停止 : systemctl stop firewalld.service
- 禁止开机启动 : systemctl disable firewalld.service
-------------------操作相关-------------------
- 查看版本 : firewall-cmd --version
- 查看帮助 : firewall-cmd --help
- 查看FireWall状态 : firewall-cmd --state
- 查看区域信息 : firewall-cmd --get-active-zones
- 更新防火墙规则 :
1firewall-cmd --reload 软重启不会断开端口链接
2firewall-cmd --complete-reload 硬重启会断开端口链接
- 查看zong下打开的端口 : firewall-cmd --zone=(zone) --list-ports // 这里的zong 可以更换成 : drop(丢弃)/block(阻塞)/public(公开)/external(外部)/dmz(隔离区)/work(工作)/home(家庭)/internal(内部)/trusted(受信任的)
-------------------常用端口-------------------
firewall-cmd --zone=public --add-port=80/tcp --permanent 开放80
firewall-cmd --zone= public --remove-port=80/tcp --permanent 关闭80
firewall-cmd --zone=public --add-port=3306/tcp --permanent 开放3306
RedHat7系列(Centos/Debian) FireWall 防火墙 设置的更多相关文章
- centOS服务器-firewall防火墙开放端口
前言 日常开发中,我们常常会因为服务器各种端口未开放出现各种问题,下面我们就来简单了解下服务器上的端口开放!!! 作为一个后台开发,日常接触最多的除了代码就是服务器了: 产品:谁谁, 线上有个功能报错 ...
- CentOS 7.0防火墙设置
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙.1.关闭firewall:systemctl stop firewalld.servicesystemctl ...
- (十八)Centos之firewall 防火墙命令
如果你的系统上没有安装使用命令安装 #yum install firewalld //安装firewalld 防火墙 开启服务 # systemctl start firewalld.service ...
- centos 7 firewall(防火墙)开放端口/删除端口/查看端口
1.firewall的基本启动/停止/重启命令 复制#centos7启动防火墙 systemctl start firewalld.service #centos7停止防火墙/关闭防火墙 system ...
- CentOS 7中firewall防火墙详解和配置以及切换为iptables防火墙
官方文档介绍地址: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Security_Gui ...
- Skynet服务器框架(十) CentOS 防火墙设置
引言: 今天修改了 skynet 服务器的 IP 地址(即 config 文件中的 address 和 master 两项参数,IP 与当前及其的保持一致,端口号为 2017),然后使用一个简单的客户 ...
- CentOS 7.4中firewall防火墙详解和配置以及切换为iptables防火墙
转载:https://blog.csdn.net/xlgen157387/article/details/52672988 一.firewall介绍 CentOS 7中防火墙是一个非常的强大的功能,在 ...
- centos 7 防火墙设置
一.介绍 centos 7 的防火墙是以firewalld daemon的形式存在,区别于iptables 二.使用方法 centos7 主要通过firewall-cmd命令来管理firewall, ...
- CentOS 7中firewall防火墙详解和配置以及切换为iptables防火墙--转载
最近在linux(这里用到的是Centos7的64位版本)安装nginx时,在开放80端口时用iptables设置端口 和重启服务发现提示未找到文件,在网络上收集查找后发现在Centos7中iptab ...
随机推荐
- Object.prototype.toString.call() 、 instanceof 以及 Array.isArray()判断数组的方法的优缺点
1. Object.prototype.toString.call() 每一个继承 Object 的对象都有 toString 方法,如果 toString 方法没有重写的话,会返回 [Object ...
- Asp .Net Core Spa (二) - 服务器渲染1
Server Side Rendering 服务器渲染是各 Spa 项目目前很热衷于解决的一个问题,毕竟针对SEO和首次加载优化 .Net Core SPA 服务器渲染 将分为 两篇: 第一篇 主要分 ...
- tp5.0中使用PHPexcel,以及Loader的一些问题
在5.0中使用PHPexcel遇到一些问题,记录一下方便以后查看. 非使用PHPexcel的方法: 参考:http://blog.csdn.net/sinat_35861727/article/det ...
- ATOM:亮瞎程序员双眼的编辑器插件横空出世
Atom 编辑器有一个叫 activate-power-mode,啥玩意?看下面的动图吧,非常有 Power ,有木有!!!自带眩晕特技,有木有!
- java 秒时间格式化
public static String durationFormat(Integer totalSeconds) { if (totalSeconds == null || totalSeconds ...
- 进制与ASCII码转换
LabeledEdit4.Text := chr(); // 用十进制方式赋值: ASCII码转换为字符 65 -> A LabeledEdit4.Text := #; // 用十进制方式赋值: ...
- TypeError: format string
先来看一段Python代码: class Negate: def __init__(self, val): self.val = -val def __repr__(self): return str ...
- 互动科技 快乐分享 X/Open DTP——分布式事务模型
这一几天一直在回顾事务相关的知识,也准备把以前了解皮毛的知识进行一些深入总结,虽然这一些知识并没有用到,但是了解其实现原理还是很有必要的,因为知道了原理,你也能把它实现出来. 在上一节事务的编程模型里 ...
- C#中五种访问修饰符作用范围 public、private、protected、internal、protected internal
1.五种访问修饰符包括哪些? public.private.protected.internal.protected internal 2.五种访问修饰符的作用范围? public :公有访问.不受 ...
- Spring Boot 与 swagger 结合
. 配置pom.xml 2. 更改端口号, 在src/main/resources 下面添加一个application.yml文件. 3. 添加一个ModelCase entity. 4. 添加一个i ...