CentOS7與CentOS6關閉開啓防火牆

一、CentOS 7 關閉打開防火牆

1、啓動防火牆: systemctl start firewalld.service

2、禁用防火牆: systemctl stop firewalld.service

3、設置開機啓動: systemctl enable firewalld.service

4、停止並禁用開機啓動: sytemctl disable firewalld.service

5、重啓防火牆: firewall-cmd --reload

6、查看狀態: systemctl status firewalld.service 

 

二、CentOS 6 關閉打開防火牆

1、開啓防火牆(重啓後永久生效):chkconfig iptables on

2、關閉防火牆(重啓後永久生效):chkconfig iptables off

3、開啓防火牆(即時生效,重啓後失效):service iptables start

4、關閉防火牆(即時生效,重啓後失效):service iptables stop

5、重啓防火牆:service iptables restartd
 

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