1、查看firewall服务状态

systemctl status firewalld

2、查看firewall的状态

firewall-cmd --state

3、开启、重启、关闭、firewalld.service服务

# 开启
service firewalld start
# 重启
service firewalld restart
# 关闭
service firewalld stop

4、查看防火墙规则

firewall-cmd --list-all

5、查询、开放、关闭端口

# 查询端口是否开放
firewall-cmd --query-port=8080/tcp# 开放80端口
firewall-cmd --permanent --add-port=80/tcp# 开放443端口
firewall-cmd --permanent --add-port=443/tcp# 移除端口
firewall-cmd --permanent --remove-port=8080/tcp#重启防火墙(修改配置后重启防火墙)
firewall-cmd --reload# 参数解释
1、firwall-cmd:是Linux提供的操作firewall的一个工具;
2、--permanent:表示设置为持久;
3、--add-port:标识添加的端口;

6、停止防火墙

systemctl stop firewalld.service

7、禁止开机启动

systemctl disable firewalld.service

其他

firewall-cmd --list-all firewall-cmd --permanent --add-port=80/tcp
firewall-cmd --permanent --add-port=443/tcp
firewall-cmd --permanent --add-port=7000/tcp
firewall-cmd --permanent --add-port=7001/tcp
firewall-cmd --permanent --add-port=8000/tcp
firewall-cmd --permanent --add-port=8001/tcp
firewall-cmd --permanent --add-port=8099/tcp
firewall-cmd --permanent --add-port=9018/tcp
firewall-cmd --permanent --add-port=8033/tcp
firewall-cmd --permanent --add-port=8282/tcp
firewall-cmd --permanent --add-port=8848/tcp
firewall-cmd --permanent --add-port=8286/tcp
firewall-cmd --permanent --add-port=8020/tcp
firewall-cmd --permanent --add-port=8060/tcpfirewall-cmd --reloadfirewall-cmd --list-all firewall-cmd --permanent --add-port=8030/tcp
firewall-cmd --permanent --add-port=38030/tcpfirewall-cmd --reloadfirewall-cmd --list-all

CentOS7防火墙设置;Linux防火墙设置;systemctl -- firewalld.service;firewall;firewall-cmd相关推荐

  1. 防火墙策略添加linux,通过iptables设置Linux防火墙INPUT策略

    原标题:通过iptables设置Linux防火墙INPUT策略 小白电脑课堂开课啦!游戏团战就死机,多半是废了.大家好我是小白.说到防火墙,同学们都会想到开了防火墙就会卡的Windows.而在Linu ...

  2. 虚拟机linux防火墙配置,Linux防火墙配置

    Centos 7和 Centos 6开放查看端口 防火墙关闭打开 Centos 7 firewall 命令: 查看已经开放的端口: firewall-cmd--list-ports 开启端口 fire ...

  3. linux防火墙准入,Linux防火墙操作

    8种机械键盘轴体对比 本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选? 防火墙是位于 内部网 和 外部网(一般指公网) 之间的屏障, 它按照系统管理员预先定义好的 规则 来控制数据包的进出. ...

  4. linux 查看本地防火墙设置,Linux防火墙设置命令的几种方法

    iptables防火墙 1.基本操作 # 查看防火墙状态 service iptables status # 停止防火墙 service iptables stop # 启动防火墙 service i ...

  5. 设置Linux防火墙时间同步

    关闭防火墙 # 关闭防火墙 systemctl stop firewalld systemctl stop iptables #禁止firewall开机启动 systemctl disable fir ...

  6. linux红帽子怎么设置防火墙,RedHat Linux如何设置防火墙

    为它具备最好的图形界面,无论是安装.配置还是使用都十分方便,而且运行稳定,因此不论是新手还是老玩家都对它有很高的评价,但他同时也跟普通操作系统一样需要保护.下面是学习啦小编跟大家分享的是RedHat ...

  7. linux还原防火墙设置,Linux防火墙设置

    Linux防火墙操作 1.重启后生效 ​ 开启: chkconfig iptables on ​ 关闭: chkconfig iptables off 2.即时生效 开启: service iptab ...

  8. linux有防火墙么,Linux防火墙Firewall和Iptables的使用

    摘要 Linux中有两种防火墙软件,ConterOS7.0以上使用的是firewall,ConterOS7.0以下使用的是iptables,本文将分别介绍两种防火墙软件的使用. Firewall 开启 ...

  9. linux学习之防火墙,查看Linux防火墙状态,开启/关闭Linux防火墙,Linux防火墙开放5236端口

    Firewalld RHEL7是一个集合多款防火墙管理工具并存的系统,Firewalld动态防火墙管理器服务(Dynamic Firewall Manager of Linux systems)是目前 ...

最新文章

  1. 最后一个社团换届的感谢和感悟
  2. 单片机里XPL是什么_单片机可以替代PLC么?
  3. 上海哪个图书馆营业时间最长
  4. html调用接口_Spring 自调用事务失效,你是怎么解决的?
  5. SpringBoot2.x整合Redis 分布式集群_02
  6. STM32F103:二.(5)控制HC-SR04超声波
  7. python数据分析第一步:读取以及查看数据
  8. 从安装认识Angular 2
  9. 驱动外置+原版安装方式『XLOS_Windows8_Pro_X86纯净版_V1.0』
  10. centos安装python3.7和yum报错解决方法
  11. ipython 安装_IPYTHON安装.DOC
  12. MSXML版本6.10.1129.0
  13. 本学期关于Android学习的总结
  14. linux 编辑文件出现E45readonly option is set (add! to .....)
  15. 我看QQ与360之争
  16. codeforces 300B切题记录
  17. python取随机小数_python生成2位小数点的随机数
  18. LabWindows界面的程序控制
  19. python学习笔记 os.scandir遍历目录
  20. 马斯克为啥要成立SpaceX

热门文章

  1. 【Paper】Short Term Electric Energy Consumption Prediction in in Smart Buildings Methods Survey
  2. 倍福BECKHOFF PLC:FileWirte/Puts,FileRead/Gets File Function Blocks文件操作功能块
  3. centos 静态编译MP4box
  4. SSD1963 LCD驱动 FSMC接口,stm32f207【未完】
  5. c语言零基础第三课:运算符学习
  6. 2022年广东高新技术企业优惠政策及高新企业申请条件,补贴20-100万
  7. imx280学习之Uboot移植
  8. unity开发炉石传说系列卡牌生成代码部分代码
  9. dotnet OpenXML 文本 Kerning 字间距的作用
  10. python 常用的几种定位方式