Intune: Windows Firewall Public - Disable Inbound Notifications

πŸ’Ό Management Samenvatting

Disable inbound firewall notifications on Public profile - prevents user notification spam (public WiFi = many blocked connections).

Aanbeveling
IMPLEMENT
Risico zonder
Low
Risk Score
3/10
Implementatie
2u (tech: 1u)
Van toepassing op:
βœ“ Windows 10
βœ“ Windows 11

Firewall notifications = user confusion: Public WiFi: Attacker port scans β†’ firewall blocks β†’ Windows notification 'Windows Firewall has blocked some features...', Notification flood: Public WiFi = 100+ blocked connections β†’ 100+ notifications (user overwhelmed), User behavior: Notification fatigue β†’ users click 'Allow' without reading (security bypass). Disable notifications: Silent blocking (firewall works maar no user prompts), Logs: Still available (Event Viewer, firewall.log - security team monitoring), User: No distractions (firewall protects silently).

PowerShell Modules Vereist
Primary API: Microsoft Graph API
Connection: Connect-MgGraph
Required Modules: Microsoft.Graph.DeviceManagement

Implementatie

Disable notifications: Policy: Disable inbound notifications: True (no user prompts), Effect: Firewall blocks traffic silently (no Windows notifications), Logging: Still active (firewall.log, Event Viewer), Security team: Monitors logs (users don't see notifications).

Vereisten

  1. Intune subscription
  2. Windows 10/11
  3. Firewall logging enabled (security team monitoring)

Implementatie

Intune Settings Catalog: Windows Firewall β†’ Public Profile β†’ Disable inbound notifications: True. Effect: Silent blocking (no user prompts).

Compliance

CIS Windows Benchmark L1, BIO 13.01.

Monitoring

Gebruik PowerShell-script enable-public-network-firewall-disable-inbound-notifications-is-set-to-true.ps1 (functie Invoke-Monitoring) – Controleren.

Remediatie

Gebruik PowerShell-script enable-public-network-firewall-disable-inbound-notifications-is-set-to-true.ps1 (functie Invoke-Remediation) – Herstellen.

Compliance & Frameworks

Automation

Gebruik het onderstaande PowerShell script om deze security control te monitoren en te implementeren. Het script bevat functies voor zowel monitoring (-Monitoring) als remediation (-Remediation).

PowerShell
<# .SYNOPSIS Intune Windows Firewall: Public Disable Notifications .DESCRIPTION CIS - Public notifications disabled. .NOTES Filename: firewall-public-notifications.ps1|Author: Nederlandse Baseline voor Veilige Cloud|NetSH: Public NotifyOnListen|Expected: False #> #Requires -Version 5.1 #Requires -RunAsAdministrator [CmdletBinding()]param([switch]$WhatIf, [switch]$Monitoring, [switch]$Remediation, [switch]$Revert) $ErrorActionPreference = 'Stop'; $Profile = "Public"; $ExpectedValue = $false function Connect-RequiredServices { $p = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()); return $p.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) } function Test-Compliance { $r = [PSCustomObject]@{ScriptName = "firewall-public-notifications.ps1"; PolicyName = "Firewall Public Notifications"; IsCompliant = $false; CurrentValue = $null; ExpectedValue = "Disabled"; Details = @() }; function Invoke-Revert { Set-NetFirewallProfile -Name $Profile -NotifyOnListen True } try { $fw = Get-NetFirewallProfile -Name $Profile -ErrorAction SilentlyContinue; if ($fw) { $r.CurrentValue = $fw.NotifyOnListen; if ($fw.NotifyOnListen -eq $ExpectedValue) { $r.IsCompliant = $true; $r.Details += "Notifications disabled" }else { $r.Details += "Notifications: $($fw.NotifyOnListen)" } }else { $r.Details += "Profile niet gevonden" } }catch { $r.Details += "Error: $($_.Exception.Message)" }; return $r } function Invoke-Remediation { Set-NetFirewallProfile -Name $Profile -NotifyOnListen False; Write-Host "Public notifications disabled" -ForegroundColor Green } function Invoke-Monitoring { $r = Test-Compliance; Write-Host "`n$($r.PolicyName): $(if($r.IsCompliant){'COMPLIANT'}else{'NON-COMPLIANT'})" -ForegroundColor $(if ($r.IsCompliant) { 'Green' }else { 'Red' }); return $r } function Invoke-Revert { Set-NetFirewallProfile -Name $Profile -NotifyOnListen True } try { if (-not(Connect-RequiredServices)) { exit 1 }; if ($Monitoring) { $r = Invoke-Monitoring; exit $(if ($r.IsCompliant) { 0 }else { 1 }) }elseif ($Remediation) { if (-not $WhatIf) { Invoke-Remediation } }elseif ($Revert) { Invoke-Revert }else { $r = Test-Compliance; exit $(if ($r.IsCompliant) { 0 }else { 1 }) } }catch { Write-Error $_; exit 1 }

Risico zonder implementatie

Risico zonder implementatie
Low: Low: Notification flood on public WiFi = user fatigue (users may allow traffic to stop notifications).

Management Samenvatting

Disable Public firewall inbound notifications. Silent blocking. No user distraction. Logs still available. Implementatie: 1-2 uur.