EGR066 - Several Windows Firewall Rules Share the Name
Agent error code #EGR066 indicates that more than one Windows Firewall rule on the agent host has the name a Windows egress knoc gives in Rule. Windows allows rules to share a name, but it hands the agent only one of them when asked for a rule by name, and which one is not defined. The agent could add a user's exception to a rule that does not fence the knoc's destinations, so it refuses the grant and the revoke instead.
Common causes include:
- The rule was created twice, for example by running a setup script again
- An Allow rule and a Block rule were given the same name
- A Group Policy delivers a rule with the same name as a local one
Steps to Resolve
List the Rules With the Name
Get-NetFirewallRule -DisplayName "kk_bastion_egress" | Select-Object Name, DisplayName, Direction, Action, PolicyStoreSourceType
Give the Knoc's Rule a Name of Its Own
Delete the duplicates, or rename every rule but the outbound Block rule for the knoc's destinations: Set-NetFirewallRule -Name <Name> -NewDisplayName "<new name>", using the Name column from the list above.