Menu & Search

Installing Firewalld on Linux

Installing Firewalld on Linux

This post contains installation notes for installing Firewalld on an Amazon Linux 2 EC2 instance.

Firewalld is a Linux firewall tool that makes it easy to create custom firewall rules. It acts as a frontend for iptables, the packet filtering system, and lets you apply rules dynamically. This makes it a great tool for keeping your Linux system’s network secure. You can use the firewall-cmd command-line tool to manage your firewall rules and configurations. Check out the Firewalld documentation for more info.

Install Firewalld on Linux

To install Firewalld on an Amazon Linux 2 EC2 instance, you might need to first ensure that the epel-release package is installed on your system. This package provides access to the Extra Packages for Enterprise Linux (EPEL) repository, which contains the Firewalld package. You can install the epel-release package using the following command:

sudo yum install epel-release

To get started with the Firewalld install, log in to your EC2 instance and run the following commands:

sudo yum install firewalld
Linux Yum Install Firewalld

The command sudo systemctl start firewalld is used to start the Firewalld service on a Linux system. Once the above install is complete start the Firewalld service:

sudo systemctl start firewalld
sudo systemctl enable firewalld
sudo systemctl status firewalld
Linux SystemCtl Start Firewalld

Firewalld should now be up and running on your Amazon Linux 2 EC2 instance. You can then use the firewall-cmd command-line tool to manage your firewall rules and configurations. For example, you can use the --list-all option to view all of the currently active firewall rules:

firewall-cmd --list-all

This will show you all of the rules that are currently in effect, along with information about which zones they apply to and the sources and destinations they apply to. This can be useful for troubleshooting and verifying that your firewall is configured as you expect.

1 Comment

  1. […] I’m using Firewalld as per Microsoft’s guide – here’s my quick install notes. […]