开机启动的开启与禁止

# 开机启动
systemctl enable firewalld # 禁止开机启动
systemctl disable firewalld

基本操作

# 查看状态
systemctl status firewalld # 启动/停止/重启firewalld
systemctl start firewalld
systemctl stop firewalld
systemctl restart firewalld

服务、端口的添加与删除

# 添加服务,其实就是开启22端口
firewall-cmd --permanent --add-service=ssh # 添加端口
firewalld-cm --permanent --add-port=1234/tcp # 删除服务
firewalld-cm --permanent --remove-service=ssh # 删除端口
firewalld-cm --permanent --remove-port=1234/tcp

使操作生效

firewall-cmd --reload

查看被firewalld允许的服务

firewall-cmd --permanent --list-all

端口转发

# 将80端口转发至8080
firewall-cmd --add-forward-port=port=80:proto=tcp:toport=8080 # 将80端口转发至192.168.0.1
firewall-cmd --add-forward-port=port=80:proto=tcp:toaddr=192.168.0.1 # 将80端口的流量转发至192.168.0.1的8080端口
firewall-cmd --add-forward-port=port=80:proto=tcp:toaddr=192.168.0.1:toport=8080 # 删除端口转发
firewall-cmd --remove-forward-port=port=80:proto=tcp:toaddr=192.168.0.1

CentOS7防火墙firewalld的配置的更多相关文章

  1. CentOS7防火墙firewalld 和 CentOS6防火墙iptables的一些配置命令

    CentOS7 防火墙 一.防火墙的开启.关闭.禁用.查看状态命令 (1)启动防火墙:systemctl start firewalld (2)关闭防火墙:systemctl stop firewal ...

  2. 5分钟理解Centos7防火墙firewalld

    版权声明:本内容为原创内容,转载请声明出处. 原文地址:http://www.excelib.com/article/287/show firewalld简介 Centos7中默认将原来的防火墙ipt ...

  3. fedora/centos7防火墙FirewallD详解

    1 使用 FirewallD 构建动态防火墙 1.1 “守护进程” 1.2 静态防火墙(system-config-firewall/lokkit) 1.3 使用 iptables 和 ip6tabl ...

  4. CentOS7.3防火墙firewalld简单配置

    今天安装了centos7.3, 想用iptables的save功能保存规则的时候发现跟rhel不一样了,  后来度娘说centos用的是firewalld而不是iptables了, 平时工作都是用re ...

  5. Centos7 防火墙firewalld配置

    开启80端口 firewall-cmd --zone=public --add-port=80/tcp --permanent  出现success表明添加成功 移除某个端口 firewall-cmd ...

  6. CentOS7 防火墙firewalld详细操作

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

  7. Centos7 防火墙 firewalld 实用操作

    一.前言 Centos7以上的发行版都试自带了firewalld防火墙的,firewalld去带了iptables防火墙.其原因是iptables的防火墙策略是交由内核层面的netfilter网络过滤 ...

  8. CentOS7防火墙firewalld使用

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

  9. CentOS7防火墙firewalld

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

随机推荐

  1. 前端学习02:jQuery 日历

    引言:学习前端已经接近1个月了,先后经历了1周的 html+css, 2周的"JavaScript 从入门到下跪",期间还看了vue+webpack.然鹅,Mentor Brigh ...

  2. PAT A1001 A+B Format

    Calculate a+b and output the sum in standard format -- that is, the digits must be separated into gr ...

  3. 关于mysql使用utf8编码在cmd窗口无法添加中文数据的问题以及解决 方法二

    如果非要用cmd窗口的话,那么可以加这句话,set names gbk:

  4. 手写封装防抖debounce

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  5. mint-ui中messagebox的使用

    效果图: 代码: // 安装 # Vue 1.x npm install mint-ui@1 -S # Vue 2.0 npm install mint-ui -S // 引入全部组件 import ...

  6. TINY语言采用递归下降分析法编写语法分析程序

    目录 自顶向下分析方法 TINY文法 消左提左.构造first follow 基本思想 python构造源码 运行结果 参考来源:聊聊编译原理(二) - 语法分析 自顶向下分析方法 自顶向下分析方法: ...

  7. Spring-Bean标签属性scope范围

    scope:指对象的作用范围,取值如下 1.singleton:默认值,单例的 2.prototype:多例的 3.request:WEB项目,Spring创建一个Bean的对象,把对象存入到requ ...

  8. 检查是否安装ASM

    ASM和管理 ASM是一个有效的抽象层,使Oracle数据库可以与叫做DiskGroups的抽象空间一起使用,而不是直接使用DataFiles. Oracle ASM脱离操作系统的文件系统约束,使得对 ...

  9. 超详细讲解H5移动端适配

    前言 移动互联网发展至今,各种移动设备应运而生,但它们的物理分辨率可以说是五花八门,一般情况UI会为我们提供375尺寸的设计稿,所以为了让H5页面能够在这些不同的设备上尽量表现的一致,前端工程师就不得 ...

  10. 【深度学习 论文篇 02-1 】YOLOv1论文精读

    原论文链接:https://gitee.com/shaoxuxu/DeepLearning_PaperNotes/blob/master/YOLOv1.pdf 笔记版论文链接:https://gite ...