1、查看防火墙状态centos6系统查看防火墙状态,可以使用/etc/init.d
2、centos7系统采用systemctl 命令查看
3、重启/启动防火墙 centos6是iptables服务,
4、centos7重启systemctl是没有提示的,建议使用systemctl status查看状态
5、查看防火墙规则防火墙规则查看,可以使用iptables -L查看
6、如果清除防火墙是iptables -F
7、设置防火墙规则centos6系蕙蝤叼翕统如果要设置规则,可以编辑/etc/sysconfig/iptables文档
8、centos7系统修改文件,需要通过firewall-cmd命令
9、总结:centos6 启咿蛙匆盗动服务/etc/init.d/iptables start|restartcentos7 启动服务 systemctl restart firewalld酴兑镗笄查看服务 iptables -L设置规则 centos6 /etc/sysconfig/iptablescentos7 firewall-cmd