1、查看防火前状态:/etc/init.d/iptables status

2、开斤泰启防火墙:/etc/init.d/iptables start

3、关闭防蕉耕争火墙:/etc/init.d/iptables stop

4、设置防火墙开侨宙机不起动: chkconfig iptables off

1、开启防火墙:systemctl start firewalld

2、看防火前状态:firewall-cmd --state

3、关闭防火墙:systemctl stop firewalld

4、关闭防火墙开机启动:systemctl disable firewalld

5、查看防火墙开机启动状态:systemctl list-unit-files|grep firewalld
