On the domain controller, open the group policy management tool.
Create a new group policy.
Enter a name for the new group policy.
In our example, the new GPO was named: MY-GPO.
On the Group Policy Management screen, expand the folder named Group Policy Objects.
Right-click your new Group Policy Object and select the Edit option.
On the group policy editor screen, expand the Computer configuration folder and locate the following item.
Select the option named Windows Firewall with Advanced Security
Access the option named Windows firewall properties.
Select the desired network profile and perform the following configuration:
• Firewall state - On.
• Inbound connections - Block.
• Outbound connections - Allow.
Click on the OK button.
In our example, we are going to enable the Windows firewall when the computer is connected to the Domain network.
In our example, we are going to allow outbound connections.
In our example, we are going to block inbound connections.
The computer will be allowed to start a communication with any device.
Other devices will not be allowed to start communication with the computer.
Optionally, enable the log of blocked packets.
Enable the option named Log dropped packets.
This is the default path for the Windows firewall log.
To save the group policy configuration, you need to close the Group Policy editor.
Congratulations! You have finished the GPO creation.