[Windows Firewall] An error occurred while adding the rule. Access is denied.

Confirmed OS environment
  • Windows Server 2012
  • Windows Server 2012 R2
  • Windows Server 2016
  • Windows Server 2019

1. Symptom

Error occurs while adding a new rule to Windows Firewall.

An error occurred while adding the rule.
Error: Access is denied
Status: The rule was parsed successfully from the store.

Windows Firewall with Advanced Security

2. Cause & Resolution

There are two possible causes.

Cause 1. You don’t have the correct permission

As stated in the error message this issue may occur when you don’t have the correct permission to open ” the Windows Firewall with Advanced Security” console. Please make sure that the user trying to open firewall belongs to one of the following group.

  • Administrators
  • Network Configuration Operators

Cause 2. MpsSvc doesn’t have the permission to access to Firewall Policy

This is issue also may occur when Windows Firewall Service doesn’t have the permission to access to Firewall rules.

Resolution

1. Open Registry Editor.
2. Open Registry Editor.Open the following registry key:
HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy
3. Right-click on “FirewallPolicy” and select “Permissions”

4. Check if MpsSvc exists. If it not exists click “Add”.

5. Type NT Service\MpsSvc and click “OK”.

6. Click “Apply” and then click “Advanced”.

7. Select “mpssvc” and then click “Edit”.

8. Click “Show advanced permission”.

9. Select permissions as shown below and click “OK”.

10. Click “OK”.

11. Click “OK”.

End.

Comments

Copied title and URL