CentOS 7防火牆的關閉與開啓

(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 #永久關閉防火牆

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章