CentOS 7.0默认使用的是firewall作为防火墙,使用iptables需要安装相关包
关闭防火墙
systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动
使用iptables
yum -y install iptables iptables-services systemctl start iptables.service #启动防火墙 systemctl stop iptables.service #关闭防火墙 systemctl enable iptables.service #设置防火墙开机启动 systemctl disable iptables.service #禁止防火墙开机启动 service iptables save #保存防火墙规则
本文出自 “jinchuang” 博客,请务必保留此出处http://jinchuang.blog.51cto.com/8690689/1947056
原文地址:http://jinchuang.blog.51cto.com/8690689/1947056