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!

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:

$ rpm -qa firewalld
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:

$ sudo yum install firewalld

Now, start the FirewallD service by executing this command:

$ sudo systemctl start firewalld

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

$ sudo systemctl enable firewalld

Lastly, check out the status of FirewallD service:

$ sudo systemctl status firewalld

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:

To unmask FirewallD service, we will execute this command:

$ sudo systemctl unmask firewalld

Now, start the FirewallD service on your system:

$ sudo systemctl start firewalld

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

$ sudo systemctl status firewalld

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:

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

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

$ sudo systemctl enable firewalld

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

$ sudo systemctl status firewalld

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:

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.

 

来源 https://linuxhint.com/fix-firewalld-not-running-error-centos/

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。