CentOS 7打开关闭防火墙相关命令

 时间:2026-04-25 11:21:24

1、查看centos 版本:cat /etc/redhat-release

CentOS 7打开关闭防火墙相关命令

CentOS 7打开关闭防火墙相关命令

2、启动服务:systemctl start firewalld.service

如果服务报错Failed to start firewalld.service: Unit is masked

执行systemctl unmask firewalld.service

再启动 systemctl start firewalld.service

CentOS 7打开关闭防火墙相关命令

CentOS 7打开关闭防火墙相关命令

3、关闭服务:systemctl stop firewalld.service

CentOS 7打开关闭防火墙相关命令

4、重启服务:systemctl restart firewalld.service

CentOS 7打开关闭防火墙相关命令

5、显示服务的状态:systemctl status firewalld.service

CentOS 7打开关闭防火墙相关命令

6、在开机时启用/关闭服务

systemctl enable firewalld.service

systemctl disable firewalld.service

CentOS 7打开关闭防火墙相关命令

7、查看已启动的服务列表

systemctl list-unit-files|grep enabled

CentOS 7打开关闭防火墙相关命令

8、停止 firewalld

# systemctl stop firewalld


# systemctl mask firewalld

CentOS 7打开关闭防火墙相关命令

  • jquery如何改变input的提示文字
  • rest异步响应怎么办
  • Windows Server 2012 R2如何创建DNS别名记录
  • 火狐浏览器如何安装RESTClient插件
  • C#如何遍历数组元素
  • 热门搜索
    山西省旅游地图 重庆仙女山旅游攻略 上海到北京旅游 德国旅游必去的地方 浙江天台山旅游攻略 英国旅游签证材料 抚远旅游 香格里拉旅游局 珠海东澳岛旅游攻略 西安旅游报价