Create windows firewall with gpo
Last updated:
WINDOWSGPOFIREWALL
Configure firewall service
- Computer Configuration > Policies > Windows Settings > Security Settings > System Services. Find Windows Firewall in the list of services and change the startup type to Automatic (Define this policy setting -> Service startup mode Automatic).
- Computer Configuration > Policies > Administrative Templates > Network > Network Connections > Windows Defender > Firewall > Domain Profile and enable the policy Windows Defender Firewall: Protect all network connections.
- Computer Configuration > Windows Settings > Security Settings section. Right-click Windows Firewall with Advanced Security and open the properties. Make sure to enable the Firewall State to On(Recommended) on each of the profiles you will be using (enabling on all is best practice).
Configure firewall rules
Computer Configuration > Policies > Windows Settings > Security Settings > Windows Firewall with Advanced Security.
- You can use custom to specify port and remote address and app as well.
We need the following information:
Remote Address,App,Protocol,Port,Purpose
App can be any (basically .exe path needs to be provided)