# Ensure 'Windows Firewall: Public: Settings: Display a notification' is set to 'No'

Necessity: Disabling notifications for the Windows Firewall on the Public profile prevents users from being prompted to allow or block unsolicited incoming network traffic for applications. This is critical because users might inadvertently create security exceptions for malicious software, thereby bypassing the firewall's protection and increasing the system's attack surface. Enforcing a 'No' policy ensures that only administrator-defined rules govern network access, maintaining a consistent and secure perimeter. Auditing and Remediation: The audit script checks the value of the 'NotifyOnListen' property for the 'Public' profile using the 'Get-NetFirewallProfile' PowerShell cmdlet. The remediation script uses 'Set-NetFirewallProfile' to change this boolean setting, disabling the notification prompt as required. Recommended State Rationale: The recommended state for Basic, Moderate, and Strict levels is uniformly 'No'. There is no security benefit to enabling these notifications, especially on a public network where the threat level is highest. Allowing user-driven firewall exceptions is inherently risky. Therefore, the most secure posture, regardless of the hardening level, is to disable this feature to ensure that all firewall rules are managed centrally and deliberately by administrators.

## Recommended State Configuration

| Security Level | Value |
|----------------|-------|
| **Basic** | `['No']` |
| **Moderate** | `['No']` |
| **Strict** | `['No']` |
| **Type** | `ENUM` |

## Audit Script Working

PowerShell script that retrieves the 'NotifyOnListen' setting for the 'Public' Windows Firewall profile. The script must only output the current value, which will be either 'True' or 'False', without any additional text or labels.

## Remediation Script Working

PowerShell script that sets the 'NotifyOnListen' value for the 'Public' Windows Firewall profile. The script must accept a single positional command-line argument that maps to the desired state ('Yes' maps to '$true', 'No' maps to '$false'). It must return '$true' upon successful application of the setting and '$false' on failure.

