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!
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:
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.
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:
Now, start the FirewallD service by executing this command:
After starting the FirewallD service, enable it on your CentOS system:
Lastly, check out the status of FirewallD service:
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:
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:
To unmask FirewallD service, we will execute this command:
Now, start the FirewallD service on your system:
Then, check out the status of FirewallD service by executing the below-given command in your terminal:
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:
If the FirewallD service has “inactive” status without declaring any reason, then you should enable FirewallD on your system:
To fix the “FirewallD is not running” error on CentOS, the first thing to do is to start the FirewallD service:
Now, enable it on your CentOS system by writing out the below-given command in the terminal:
To check out the status of the FirewallD service execute this command:
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:
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:
Enter your system password for the authentication purpose:
The output declares that we have fixed the “FirewallD is not running” error on our CentOS system:
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 running” error 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.