1. 程式人生 > >002-Linux下防火墻相關命令操作

002-Linux下防火墻相關命令操作

style 默認 ice 查看 開機啟動 操作 run ted spa

  linux的各個版本或同一個版本間不同版本號關於防火墻命令也會有不一樣的。針對這些命令整理如下,方便自己或有需要的朋友查閱。

centOS 6.5關閉防火墻步驟 關閉命令: service iptables stop 永久關閉防火墻:chkconfig iptables off 兩個命令同時運行,運行完成後查看防火墻關閉狀態 service iptables status

centos7.0默認防火墻為firewalld(為了測試,關閉默認防火墻,使用iptables防火墻)

systemctl stop firewalld.service #停止firewall

systemctl disable firewalld.service #禁止firewall開機啟動

查看默認防火墻狀態:

firewall-cmd --state

not running

002-Linux下防火墻相關命令操作