How to fix “FirewallD is not running” error on CentOS

Are you looking for a solution to fix the “FirewallD is not running” error? We are here to help you. On Linux based operating systems such as CentOS, FirewallD is a firewall management utility. It acts as an interface to the Linux kernel netfilter infrastructure, offering firewall functionality. It supports firewall zones, bridging, IPv6, IPv4 and other sets of IP for networks.

If FirewallD is not enabled or your system does not have this tool, you may encounter the “FirewallD is not running” error in your CentOS terminal. In this post, we will look at three different solutions to fix “FirewallD is not running” error on CentOS system. So, let’s begin!

How to check FirewallD service on CentOS

There is a possibility that you have not installed or enabled FirewallD on your CentOS. To confirm the cause of this error, run the following command:

$ rpm -qa firewalld

On CentOS, the rpm utility allows users to update, check, request, install, and remove any package. We will add the “-qa” parameter to request the FirewallD package in the rpm command. As a result, if the output shows any details about the FirewallD package, then the FirewallD package is installed.

If running rpm does not show any information related to FirewallD, you must first install it on your system before configuring it.

Go ahead and install FirewallD if not already installed on your CentOS system. Otherwise, skip to the next section and follow the procedure to enable FirewallD service on CentOS.

How to fix “FirewallD is not running” error on CentOS by installing FirewallD

To install FirewallD on your system, open a CentOS terminal by pressing CTRL + ALT + T and write the following in it:

$ sudo yum install firewalld

Now start the FirewallD service by running this command:

$ sudo systemctl start firewalld

After starting the FirewallD service, enable it on your CentOS system:

$ sudo systemctl enable firewalld

Finally, check the status of the FirewallD service:

$ sudo systemctl status firewalld

How to fix the error “FirewallD is not running” in CentOS by removing the mask from FirewallD

You can get stuck with FirewallD installed on your system; however, executing any FirewallD command still shows the “FirewallD is not running” error. To fix this error, you need to know the status of the FirewallD service on your system:

$ sudo systemctl status firewalld

Your FirewallD service may be disguised, so it is inactive on your system. To resolve this “FirewallD is not running” error, you must first unmask it before enabling it on your CentOS system:

To unmask the FirewallD service, we’ll run this command:

$ sudo systemctl unmask firewalld

Now start the FirewallD service on your system:

$ sudo systemctl запустить firewalld

Then check the status of the FirewallD service by running the command below in your terminal:

$ sudo systemctl start firewalld

How to fix “FirewallD is not running” error on CentOS by enabling FirewallD

To verify that your “FirewallD is not running” error is related to this situation, you must first check the FirewallD status status:

$ sudo systemctl status firewalld

If the FirewallD service is in an “inactive” state for no reason, you should enable FirewallD on your system.

To fix the “FirewallD is not running” error on CentOS, the first thing to do is start the FirewallD service:

$ sudo systemctl start firewalld

Now enable it on your CentOS system by running the following command in terminal:

$ sudo systemctl enable firewalld

To check the status of the FirewallD service, run this command:

$ sudo systemctl status firewalld

Done! The “FirewallD is not running” error should be fixed after performing any of the above procedures. We will now test the FirewallD service by running the example command:

$ sudo firewall-cmd --permanent --add-port=22/tcp

In this FirewallD command, the “–permanent” parameter is used to permanently set the parameters. Whereas the –add-port option was added to open port 22 for tcp protocol.

Enter the system password for authentication.

The imprint states that we have fixed the “FirewallD is not running” error on our CentOS system.

Conclusion

FirewallD is a dynamically managed firewall that offers firewall and network zone support. IPv6 and IPv64 firewall settings, IP sets, and Ethernet bridges are configured using the FirewallD utility. If you encounter the “FirewallD is not running” error on your system, then you have come to the right place! In this post, we have put together three different methods to fix “FirewallD is not running” error on CentOS system.