centos 7关闭防火墙
entOS 7.0默认使用的是firewall作为防火墙 关闭firewall: systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running) 将centos设置iptables防火墙 iptables防火墙(这里iptables已经安装,下面进行配置) vi/etc/sysconfig/iptables #编辑防火墙配置文件 # sampleconfiguration for iptables service # you can edit thismanually or use system-config-firewall # please do not askus to add additional ports/services to this default configuration *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT[0:0] :OUTPUT ACCEPT[0:0] -A INPUT -m state--state RELATED,ESTABLISHED -j