CentOS防火牆配置

2021-07-02 21:19:38 字數 506 閱讀 6333

參考(抵禦外網攻擊等高階配置):

centos 配置防火牆操作例項(啟、停、開、閉埠):

注:防火牆的基本操作命令:

查詢防火牆狀態:

[root@localhost ~]# service iptables status《回車》

停止防火牆:

[root@localhost ~]# service iptables stop 《回車》

啟動防火牆:

[root@localhost ~]# service iptables start 《回車》

重啟防火牆:

[root@localhost ~]# service iptables restart 《回車》

永久關閉防火牆:

[root@localhost ~]# chkconfig iptables off《回車》

永久關閉後啟用:

[root@localhost ~]# chkconfig iptables on《回車》

CentOS防火牆配置

一 centos7使用的是linux kernel 3.10.0的核心版本 uname a 或 cat proc version 命令檢視linux核心 新版的kernel核心已經包含了防火牆netfilter,並且firewalld的使用效能更高,穩定性更好。1 使用xml配置檔案的方式配置 2 ...

CentOS配置防火牆

當執行firewall cmd permanent zone public add port 80 tcp,提示firewalld is not running 問題在於還沒有開啟防火牆 檢視防火牆狀態 開啟防火牆 systemctl start firewalld 再次檢視防火牆狀態 開放3306...

centos防火牆配置

啟動 systemctl start firewalld 停止 systemctl stop firewalld 檢視狀態 systemctl status firewalld 或者 firewall cmd state 設定開機禁用防火牆 systemctl disable firewalld 設...