I'd like to change some preset firewall rules on a Windows 2012 server.
I can disable them, rename them, but I didn't found a way to modify them.
I want to modify the port number. This is for a special need DNS.
I already created a new rule with the new port number, but I wonder if their is a solution to modify the existing rules.
I had to do this too last week, and found you have to edit the registry.
The default rules are stored in
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Defaults\FirewallPolicy\FirewallRules]
(used when you reset the rules to default values).The current rules are stored in
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules]
(including the rules you created).Just do a search inside the required key (I did it after export into a text file, easier for me), and replace the desired settings.
To know the correct syntax, create a similar rule and look at its structure. This is easily understandable.