As a Linux user, you can opt either to allow or restrict network access to some services or IP addresses using the firewalld firewall which is native to CentOS/RHEL 8 and most RHEL based distributions such as Fedora.
The firewalld firewall uses the firewall-cmd command-line utility to configure firewall rules.
Before we can perform any configurations, let’s first enable the firewalld service using the systemctl utility as shown:
$ sudo systemctl enable firewalld
Once enabled, you can now start firewalld service by executing:
$ sudo systemctl start firewalld
You can verify the status of firewalld by running the command:
$ sudo systemctl status firewalld
The output below confirms that the firewalld service is up and running.
Check Firewalld Status
Now that we have firewalld running, we can go straight to making some configurations. Firewalld allows you to add and block ports, blacklist, as well as whitelist IP, addresses to provide access to the server. Once done with the configurations, always ensure that you reload the firewall for the new rules to take effect.
#centos #fedora #firewalls #redhat #security #centos tips #firewalld