Are you looking for a solution to fix the “FirewallD is not running” error? We are here to assist you. In Linux-based operating systems such as CentOS, FirewallD is a firewall management utility. It acts as a front-end for the netfilter framework of the Linux kernel, offering firewall functionality. It supports firewall zones, bridges, IPv6, IPv4, and other ipsets for networks.

If the FirewallD utility is not enabled or your system is missing this tool, then you may encounter a “FirewallD is not running” error in your CentOS terminal. In this post, we will check three different solutions for fixing the “FirewallD is not running” error on a CentOS system. So, let’s start!

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-213.png" data-lazy- height="309" src="data:image/svg xml,” width=”756″>

How to check FirewallD service on CentOS

There exists a possibility that you may not have installed or enabled FirewallD on your CentOS. To confirm the cause of this error, execute the below-given command:

In CentOS, the rpm utility permits users to update, verify, query, install, uninstall any package. We will add the “-qa” option to query the FirewallD package in the rpm command. As a result, if the output shows you any details about the FirewallD package, then this declares that the FirewallD package is installed:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-214.png" data-lazy- height="274" src="data:image/svg xml,” width=”736″>

If the execution of the rpm shows no information related to the FirewallD, then you first have to install it on your system before configuring it.

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-215.png" data-lazy- height="296" src="data:image/svg xml,” width=”744″>

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

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

To install FirewallD on your system, Open up your CentOS terminal by pressing “CTRL ALT T” and write out the below-given in it:

$ sudo yum install firewalld

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-216.png" data-lazy- height="509" src="data:image/svg xml,” width=”693″>

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-217.png" data-lazy- height="510" src="data:image/svg xml,” width=”694″>

Now, start the FirewallD service by executing this command:

$ sudo systemctl start firewalld

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-218.png" data-lazy- height="283" src="data:image/svg xml,” width=”694″>

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

$ sudo systemctl enable firewalld

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-219.png" data-lazy- height="290" src="data:image/svg xml,” width=”694″>

Lastly, check out the status of FirewallD service:

$ sudo systemctl status firewalld

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-220.png" data-lazy- height="426" src="data:image/svg xml,” width=”693″>

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

You can find yourself stuck in a situation where FirewallD is installed on your system; however, the execution of any FirewallD command still shows you 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 can be masked, which is why it is inactive on your system. To resolve this “FirewallD is not running” error, you have to unmask it first before enabling it in your CentOS system:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-221.png" data-lazy- height="484" src="data:image/svg xml,” width=”743″>

To unmask FirewallD service, we will execute this command:

$ sudo systemctl unmask firewalld

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-222.png" data-lazy- height="331" src="data:image/svg xml,” width=”743″>

Now, start the FirewallD service on your system:

$ sudo systemctl start firewalld

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-223.png" data-lazy- height="304" src="data:image/svg xml,” width=”739″>

Then, check out the status of FirewallD service by executing the below-given command in your terminal:

$ sudo systemctl status firewalld

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-224.png" data-lazy- height="370" src="data:image/svg xml,” width=”740″>

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

To confirm if your issue of having the “FirewallD is not running” error comes under this situation, you have to check the status of FirewallD status at first:

$ sudo systemctl status firewalld

If the FirewallD service has “inactive” status without declaring any reason, then you should enable FirewallD on your system:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-225.png" data-lazy- height="475" src="data:image/svg xml,” width=”737″>

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

$ sudo systemctl start firewalld

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-226.png" data-lazy- height="283" src="data:image/svg xml,” width=”694″>

Now, enable it on your CentOS system by writing out the below-given command in the terminal:

$ sudo systemctl enable firewalld

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-227.png" data-lazy- height="290" src="data:image/svg xml,” width=”694″>

To check out the status of the FirewallD service execute this command:

$ sudo systemctl status firewalld

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-228.png" data-lazy- height="426" src="data:image/svg xml,” width=”693″>

All done! Your “FirewallD is not running” error should be fixed after following any of the given procedures. Now, we will test the FirewallD service by executing a sample command:

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

In this FirewallD command, the “–permanent” option is utilized to set the options permanently. Whereas the “–add-port” option is added to open port 22 for the tcp protocol:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-229.png" data-lazy- height="296" src="data:image/svg xml,” width=”694″>

Enter your system password for the authentication purpose:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-230.png" data-lazy- height="511" src="data:image/svg xml,” width=”696″>

The output declares that we have fixed the “FirewallD is not running” error on our CentOS system:

<img data-lazy- data-lazy-src="https://kirelos.com/wp-content/uploads/2021/10/echo/word-image-231.png" data-lazy- height="313" src="data:image/svg xml,” width=”694″>

Conclusion

FirewallD is a dynamically controlled firewall that offers support for the firewall and network zones. IPv6 and IPv64 firewall settings, ipsets, and ethernet bridges are configured with the help of the FirewallD utility. If you have encountered the “FirewallD is not runningerror on your system, then you are at the right place! In this post, we have compiled three different methods to fix the “FirewallD is not running” error on a CentOS system.

About the author

<img alt="" data-lazy-src="https://secure.gravatar.com/avatar/c73b74cd8044d2e9b300610f5af77d0b?s=112&r=g" data-lazy- height="112" src="data:image/svg xml,” width=”112″>

Sharqa Hameed

I am a Linux enthusiast, I love to read Every Linux blog on the internet. I hold masters degree in computer science and am passionate about learning and teaching.