CentOS7关闭防火墙

1、关闭firewalld.service

(1)设置开机启用防火墙:systemctl enable firewalld.service

(2)设置开机禁用防火墙:systemctl disable firewalld.service

(3)启动防火墙:systemctl start firewalld

(4)关闭防火墙:systemctl stop firewalld

(5)检查防火墙状态:systemctl status firewalld

2、关闭SELinux

(1)查看

getenforce

(2)临时关闭

setenforce 0

(3)永久关闭

vim /etc/selinux/config

将SELINUX=enforcing改为SELINUX=disabled
设置后需要重启才能生效

 

posted @ 2021-05-21 17:42  John_2011  阅读(133)  评论(0编辑  收藏  举报