보안

Harden CentOS 9 with FirewallD

FirewallD 구성 및 모범 사례를 통해 CentOS 9 서버를 안전하게 보호하세요.

December 20, 2025 2595 조회수

Hardening CentOS 9 with FirewallD

Secure your CentOS 9 server by implementing FirewallD. This guide covers essential security measures to protect your VPS.

Why Security Matters

FirewallD is the default firewall management tool for RHEL-based systems, providing dynamic firewall management with D-Bus interface.

Step 1: Install FirewallD

sudo dnf install firewalld -y

Step 2: Configure Firewall Rules

Set up basic firewall rules:

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

Step 3: Enable FirewallD

sudo systemctl start firewalld
sudo systemctl enable firewalld

Step 4: Verify Configuration

sudo firewall-cmd --state
sudo firewall-cmd --list-all

Additional Security Tips

  • Use zones to organize firewall rules by trust level
  • Always use --permanent flag to persist rules across reboots
  • Test rules before making them permanent

Conclusion

Your CentOS server is now protected with FirewallD. Regular security audits are recommended.

이 기사를 평가해 주세요

-
Loading...

문서 검색