Error: Failed to start firewalld.service: unit is masked

Firewalld is one of the firewall management tools for Linux and it will control your server’s incoming and outgoing traffic. Failed to start firewalld.service: unit is masked is a common error that can happen due to masking issues.

On our server management plan, our support team are dealing with similar issues and we will provide support within no time.

Some of our clients faced this issue when restarting the firewalld service in their server. When they were tried to restart the firewalld service they got the below error:

Error: Failed to start firewalld.service: unit is masked

Cause for this Issue:

This firewalld failed issue mainly occurs due to the firewalld service is locked. Another cause of this error is the mask symbolic link is broken.

Solution:

We can fix this issue by unlocking or unmasking the firewalld service. In order to unmask the firewalld service, we can use the below command.

systemctl unmask firewalld
Error: Failed to start firewalld.service: unit is masked

After running this command we can start and enable the firewalld service using the below command,

systemctl start firewalld
systemctl enable firewalld

When mask link is broken:

Another main reason for this error is when starting the service the masked link is broken. Then we have to link the mask location once again to resolve this error.

If the firewalld service still fails to unmask the service even after running the previous command, then we need to manually mask it first. (The location will change based on Linux OS type)

ln -s /etc/systemd/system/firewalld.service /dev/null

Then again start the firewalld service using this command.

systemctl start firewalld

Then check the firewalld status using the below given command.

firewall-cmd -state

If you need any assistance in fixing the firewalld failure issue, Our technical support team will always ready to help you.

FREE SERVER AUDITING

Get Auditing Report of Your Server for FREE!!