1.Centos 7
关闭防火墙:systemctl stop firewalld
打开防火墙:systemctl start firewalld
查看防火墙开启信息:systemctl status firewalld
关闭开机启动防火墙:systemctl disable ffirewalld
关闭状态查询:
开启状态查询:
2.Centos6
查看防火墙状态:service iptables status
停止防火墙:service iptables stop
启动防火墙:service iptables start
重启防火墙:service iptables restart
永久关闭防火墙:chkconfig iptables off
永久关闭后重启:chkconfig iptables on