(1)CentOS 7.0默認使用的是firewall作爲防火牆;若沒有啓用iptables 作爲防火牆,則使用以下方式關閉防火牆:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall開機啓動
firewall-cmd --state #查看默認防火牆狀態(關閉後顯示notrunning,開啓後顯示running)
(2)若已經啓用iptables作爲防火牆,則使用以下方式關閉:
service iptables stop #臨時關閉防火牆
chkconfig iptables off #永久關閉防火牆