How To Install FirewallD on CentOS Stream 9

To install FirewallD on CentOS Stream 9, follow the steps below.

Step 1 : Ensure your system is up-to-date by running the following command:

sudo yum update

Step 2 : If FirewallD is not already installed, you can install it using the following command:

sudo yum install firewalld

Step 3 : Start the FirewallD service with the following command:

sudo systemctl start firewalld

Step 4 : Enable FirewallD to start at boot:

sudo systemctl enable firewalld

Step 5 : Verify the status of FirewallD with:

sudo systemctl status firewalld

Step 6 : Basic FirewallD Configuration

To allow traffic on port 80 (HTTP), use the following commands:

sudo firewall-cmd --zone=public --add-port=80/tcp --permanent
sudo firewall-cmd --reload

Congratulations! You have successfully installed and configured FirewallD on CentOS Stream 9.