手抄报 安全手抄报 手抄报内容 手抄报图片 英语手抄报 清明节手抄报 节约用水手抄报

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

时间:2024-10-13 21:47:54

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.ser箪滹埘麽vicesystemctl disable firewalld.service

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

7、查看已启动的服务列表systemctl list-unit-files|grep enabled

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

8、停止 firewalld# systemctl stop firewalld# systemctl mask firewalld

CentOS 7打开关闭防火墙相关命令
© 手抄报圈