使用 FirewallD 配置和最佳实践保护您的 CentOS 9 服务器。
通过安装防火墙, 安全您的 CentOS 9 服务器 。 本指南涵盖保护贵处的基本安全措施。
防火墙D是基于RHEL系统的默认防火墙管理工具,提供D-Bus界面的动态防火墙管理。
sudo dnf install firewalld -y
制定防火墙基本规则:
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
sudo systemctl start firewalld
sudo systemctl enable firewalld
sudo firewall-cmd --state
sudo firewall-cmd --list-all
您的 CentOS 服务器现在被防火墙D 保护了 。 建议进行定期安全审计。