1. 程式人生 > >Linux 系統關閉防火牆

Linux 系統關閉防火牆

文章目錄

概述

今天分享一個簡單的知識,雖然是簡單,但是會經常用到,而且好容易忘記啊感覺,大概是因為我記性不好吧~ txtx

centos 6

檢視防火牆的狀態

service iptables status

[[email protected] ~]# service iptables status
iptables: Firewall is not running.

關閉防火牆

臨時關閉

service  iptables stop

永久關閉

chkconfig iptables off

開啟:

chkconfig iptables on

centos7

檢視防火牆的狀態

firewall-cmd --state

[[email protected] sas_data]# firewall-cmd --state
not running

關閉防火牆

臨時關閉 :

systemctl stop firewalld

禁止開機啟動:

systemctl disable firewalld