Linux 防火牆實戰

2021-10-12 01:45:44 字數 924 閱讀 4417

# 開啟防火牆

systemctl start firewalld

# 關閉防火牆

systemctl stop firewalld

# 關閉防火牆開機自啟(永久關閉防火)

systemctl disable firewalld

# 防火牆開機自啟

systemctl enable firewalld

# 檢視防火牆是否開啟

firewall-cmd --state

# 檢視防火牆使用情況

firewall-cmd --list-ports

# 增加放行的埠 zone--區域

firewall-cmd --zone=public --permanent --add-port=8080/tcp

# 過載防火牆配置

firewall-cmd --reload

# 刪除放行指定埠

firewall-cmd --zone=public --permanent --remove-port=8080/tcp

如果你只是乙個linux新手,不建議你開啟防火牆,畢竟防火牆的命令相較畢竟繁瑣,可以考慮使用某塔面板,簡化管理,當然免費版也是夠用。

[root@vm-8-9-centos ~]

# firewall-cmd --state

running

[root@vm-8-9-centos ~]

# firewall-cmd --list-ports

20/tcp 21/tcp 80/tcp 8888/tcp 39000-40000/tcp 3306/tcp 3306/udp 22/tcp 22/udp 5010/tcp 5010/udp 6379/tcp 6379/udp

防火牆 防火牆安全

作為計算機的第一道屏障,防火牆的重要性不言而喻,儘管防火牆在面臨網路攻擊時仍有很大的缺陷,不如無法阻止自內而外的攻擊,對複雜多變的網路攻擊攻擊無法預警和像ids所做的那樣。但防火牆依然是伺服器乃至個人機的一道不可或缺的屏障。木桶原理 本文將對防火牆做乙個初步的簡介,顯然像我們知道的那樣,防火牆是一款...

linux防火牆新增埠並開閉防火牆

安裝 yum install firewalld 啟動 systemctl start firewalld 檢視狀態 systemctl status firewalld 禁用,禁止開機啟動 systemctl disable firewalld 開機啟用 systemctl enable fire...

Linux防火牆配置

重啟後生效 開啟 chkconfig iptables on 關閉 chkconfig iptables off 2 即時生效,重啟後失效 開啟 service iptables start 關閉 service iptables stop 需要說明的是對於linux下的其它服務都可以用以上命令執行...