centos7firewall防火牆操作
虛擬機器安裝好nginx後由於未開放80埠
1、firewalld的基本使用
啟動: systemctl start firewalld
檢視狀態: systemctl status firewalld
停止: systemctl disable firewalld
禁用: systemctl stop firewalld
2.systemctl是CentOS7的服務管理工具中主要的工具,它融合之前service和chkconfig的功能於一體。
啟動一個服務:systemctl start firewalld.service
關閉一個服務:systemctl stop firewalld.service
重啟一個服務:systemctl restart firewalld.service
顯示一個服務的狀態:systemctl status firewalld.service
在開機時啟用一個服務:systemctl enable firewalld.service
在開機時禁用一個服務:systemctl disable firewalld.service
檢視服務是否開機啟動:systemctl is-enabled firewalld.service
檢視已啟動的服務列表:systemctl list-unit-files|grep enabled
檢視啟動失敗的服務列表:systemctl --failed
3.配置firewalld-cmd
檢視版本: firewall-cmd --version
檢視幫助: firewall-cmd --help
顯示狀態: firewall-cmd --state
檢視所有開啟的埠: firewall-cmd --zone=public --list-ports
更新防火牆規則: firewall-cmd --reload
檢視區域資訊: firewall-cmd --get-active-zones
檢視指定介面所屬區域: firewall-cmd --get-zone-of-interface=eth0
拒絕所有包:firewall-cmd --panic-on
取消拒絕狀態: firewall-cmd --panic-off
檢視是否拒絕: firewall-cmd --query-panic
那怎麼開啟一個埠呢
新增
firewall-cmd --zone=public --add-port=80/tcp --permanent (--permanent永久生效,沒有此引數重啟後失效)
重新載入
firewall-cmd --reload
檢視
firewall-cmd --zone= public --query-port=80/tcp
刪除
firewall-cmd --zone= public --remove-port=80/tcp --permanent
相關文章
- CentOS 防火牆操作CentOS防火牆
- linux 7 防火牆操作Linux防火牆
- CentOS 7 防火牆操作CentOS防火牆
- WAb防火牆與傳統防火牆防火牆
- 防火牆防火牆
- w10防火牆在哪裡設定 windows10防火牆設定操作方法防火牆Windows
- 怎麼關閉防火牆win10_win10防火牆徹底關閉操作方法防火牆Win10
- win10防火牆關閉提醒如何操作 win10怎麼關閉防火牆提醒通知Win10防火牆
- 防火牆入侵於檢測——————3、思科 PIX 防火牆和 ASA 防火牆產品線防火牆
- iptables防火牆防火牆
- 防火牆配置防火牆
- 防火牆iptables防火牆
- 防火牆(firewall)防火牆
- Linux系統中firewalld防火牆常用的操作命令Linux防火牆
- CentOS 7.0防火牆CentOS防火牆
- Linux防火牆命令Linux防火牆
- Linux配置防火牆Linux防火牆
- 防火牆部署案例防火牆
- 防火牆介紹防火牆
- LINUX 防火牆 firewalldLinux防火牆
- win10防火牆自動開啟如何設定_win10防火牆自動開啟怎麼操作Win10防火牆
- ubuntu 關閉防火牆命令 ubuntu怎樣關閉防火牆Ubuntu防火牆
- 防火牆 搜尋 釋出 防火牆是什麼?怎麼理解?防火牆
- Firewalld防火牆基礎防火牆
- 資料庫防火牆資料庫防火牆
- Iptables防火牆應用防火牆
- CentOS防火牆設定CentOS防火牆
- Linux防火牆基礎Linux防火牆
- 防火牆的分類防火牆
- iptables防火牆規則防火牆
- Linux 防火牆配置使用Linux防火牆
- linux關閉防火牆命令 linux防火牆關閉和開啟命令Linux防火牆
- 雲伺服器需要防火牆嗎?防火牆如何啟用設定?伺服器防火牆
- 什麼是防火牆?防火牆能發揮什麼樣的作用?防火牆
- CentOS8檢視防火牆狀態,開啟/關閉防火牆CentOS防火牆
- win10關閉防火牆提示怎麼關閉_win10關閉防火牆提示徹底關閉操作方法Win10防火牆
- win10怎麼關閉防毒軟體和防火牆 win10自帶防毒防火牆永久關閉操作方法Win10防毒防火牆
- win 10怎麼用防火牆禁用軟體聯網更新_win10防火牆禁用軟體聯網更新操作方法防火牆Win10
- 怎麼重置win10防火牆_win10防火牆重置的方法Win10防火牆