CentOS7 的防火墙配置跟以前版本有很大区别,CentOS7这个版本的防火墙默认使用的是firewall,与之前的版本使用iptables不一样
1、关闭防火墙:
systemctl stop firewalld.service

2、开启防火墙:
systemctl start firewalld.service

3、关闭开机启动:
systemctl disable firewalld.service

4、开启开机启动:
systemctl enable firewalld.service
