CentOS7如何开启及关闭防火墙?

0 Comments

查看防火墙状态

[root@localhost ~]# systemctl status firewalld

关闭防火墙

[root@localhost ~]# systemctl stop firewalld                         //临时关闭,重启失效

[root@localhost ~]# systemctl disable firewalld                     //永久生效

开启防火墙

[root@localhost ~]# systemctl start firewalld                         //临时开启,重启失效

[root@localhost ~]# systemctl enable firewalld                     //永久生效

发表评论

电子邮件地址不会被公开。 必填项已用*标注