Configuring Windows Defender Firewall Rules to Prevent Unnecessary Log Entries
In environments where Windows Firewall is enabled, the eG agent generated a large number of warning messages in the security log, as shown below:
Event ID: 5031
“Windows Firewall blocked an application from accepting incoming connections on the network. Profiles: (null)
Application: C:\Program Files\<eG_Install_Dir>\jre\bin\java.exe”
These events are recorded when the agent performs Java-based port binding and the required firewall rules are not configured in Windows Firewall . In such cases, Windows Firewall applies its default block policy when the network profile appears as null, which results in repeated security events. Even though, these events do not impact agent functionality, they can create unnecessary log entries which in turn increases the size of log file. To prevent generation of these log entries, eG Enterprise recommends the following firewall configurations:
-
Application-Based Rule - create inbound firewall rules that allow all network profiles (Domain, Private, and Public) and apply the rules to the required processes, such as: java.exe, tomcat11.exe
-
Port-Based Rule - create inbound firewall rules that allow only the specific ports used for communication between the eG manager and the eG remote agent.
Creating Application-based Rule
To create an application-based rule, follow the steps below:
-
Open Windows Defender Firewall with Advanced Security (see Figure 1) by searching for it in the Start menu, or press Windows + R, type wf.msc, and press Enter.
Figure 1 : The Windows Defender Firewall with Advanced Security windows
-
In the left pane of Figure 1, select the Inbound Rules node to control incoming traffic. This will invoke the Actions pane in the right side as shown in Figure 2.
-
In the Actions pane, click the New Rule... option (see Figure 2). This will display the Rule Type window.
Figure 3 : Selecting the Rule Type for the application-based rule
-
In Figure 3, select Program as the Rule Type and click the Next button.
-
The Program window will then appear as shown in Figure 4. Now, select This program path, then click Browse and choose the application's executable file (.exe).
-
Once you have chosen the executable file, click the Next button in Figure 4. This will lead you to the Action window.
Figure 5 : Configuring an Action for the application-based rule
Select the Allow the connection option as the action to be applied (see Figure 5). Then, click the Next button to select the profiles.
-
In the Profile window that appears (see Figure 6), select the profiles for which the rule should be applied to.
-
Clicking the Next button in Figure 6 will lead you to the Name window where you need to specify the name and description for the rule as shown in Figure 7.
-
Finally, click the Finish button to register the configurations and create the rule.
Creating Port-based Rule
To create a port-based rule, follow the steps below:
-
Open Windows Defender Firewall with Advanced Security (see Figure 1) by searching for it in the Start menu, or press Windows + R, type wf.msc, and press Enter.
Figure 8 : The Windows Defender Firewall with Advanced Security window
-
In the left pane of Figure 1, select the Inbound Rules node to control incoming traffic. This will invoke the Actions pane in the right side as shown in Figure 2.
-
In the Actions pane, click the New Rule... option (see Figure 2). This will display the Rule Type window.
-
In Figure 10, select Port as the Rule Type and click the Next button.
-
Select the protocol to which the rule should be applied to in Figure 11. Then, choose Specific local ports and enter the port number or range of ports to which the rule should apply.
-
Once you have chosen the protocol and specified the ports, click the Next button in Figure 11. This will lead you to the Action window.
Figure 12 : Configuring Action for the port-based rule
Select the Allow the connection option as the action to be taken when a connection matches the conditions defined in the rule (see Figure 12). Then, click the Next button to select the profiles.
-
In the Profile window that appears (see Figure 13), select the profiles for which the rule should be applied to.
-
Clicking the Next button in Figure 13 will lead you to the Name window where you need to specify the name and description for the rule as shown in .
Figure 14 : Specifying name and description for the port-based rule
-
Finally, click the Finish button to register the configurations and create the rule.
Note:
For enhanced security and tighter network access control, port-based firewall rules are strongly recommended as they restrict communication to only the required ports, reducing network exposure and improving security. Application-based rules can be used when access needs to be granted to a specific executable and the application does not rely on fixed ports. Windows Defender Firewall supports both rule types, enabling administrators to select the method that satisfies their security, compliance, and operational requirements.