操作系統環境:CentOS Linux release 7.0.1406(Core) 64位
CentOS 7.0默認使用的是firewall作爲防火牆,這裏改爲iptables防火牆步驟。
1、關閉firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall開機啓動
firewall-cmd --state #查看默認防火牆狀態(關閉後顯示notrunning,開啓後顯示running)
還可執行systemctl status firewalld 查看防火牆狀態
圖中看到dead表明程序永久關閉了。