CentOS 7开启、查看和关闭防火墙
CentOS 7开启、查看和关闭防火墙
·
CentOS 7查看、打开和关闭防火墙
一、开启防火墙
1、临时开启,重启后恢复到原来的状态:
[root@localhost user]# systemctl start firewalld.service
2、将防火墙设为开机启动,重启后开启防火墙:
[root@localhost user]# systemctl enable firewalld.service
二、查看防火墙状态
查看防火墙服务状态:
[root@localhost user]# systemctl status firewalld.service
开启状态显示如下:
关闭状态显示如下:
三、关闭防火墙
1、临时关闭防火墙,当再次开机时,防火墙又开启:
[root@localhost user]# systemctl stop firewalld.service
2、永久关闭防火墙,禁止开机启动:
[root@localhost user]# systemctl disable firewalld.service
更多推荐
已为社区贡献3条内容
所有评论(0)