centos7 防火牆操作

2021-08-20 04:53:03 字數 540 閱讀 5466

1.

檢視已開放的埠(預設不開放任何埠)firewall

-cmd

--list

-ports

2.開啟

80埠firewall

-cmd

--zone

=public

(作用域)

--add

-port=80

/tcp(埠和訪問型別)

--permanent(永久生效)

3.重啟防火牆firewall

-cmd

--reload4.

停止防火牆systemctl stop firewalld

.service

5.禁止防火牆開機啟動systemctl disable firewalld

.service

6.刪除firewall

-cmd

--zone

=public

--remove

-port=80

/tcp

--permanent

centos 7操作防火牆

centos7 預設使用的是firewall作為防牆,使用iptables必須重設定一下。1 直接關閉防火牆 systemctl stop firewalld.service 停止firewall systemctl disable firewalld.service 禁止firewall開機啟動2...

centos7防火牆操作

1 firewalld的基本使用 啟動 systemctl start firewalld 關閉 systemctl stop firewalld 檢視狀態 systemctl status firewalld 開機禁用 systemctl disable firewalld 開機啟用 system...

centos7 防火牆操作

記錄一下centos7防火牆firewall的一些操作 檢視防火牆狀態 firewall cmd state 關閉防火牆 systemctl stop firewalld.service 禁止防火牆開機啟動 systemctl disable firewalld.service 開啟埠 80 fir...