Guide

How to check if Windows firewall is enabled

Control the Windows firewall status on Domain, Private and Public profiles.

⌚ About 2 min read
View my favorites
Web & Security Beginner 3 min

Control the Windows firewall status on Domain, Private and Public profiles.

Avant de commencer : adaptez toujours les commandes et manipulations à votre environnement. Sur un système de production, prévoyez une backup ou un retour arrière lorsque l’action peut modifier la configuration.

Étapes à suivre

  1. 1

    Open Power Shell

    Run Windows Terminal.

  2. 2

    Show Profiles

    Use the Well-NetFirewallPro File.

  3. 3

    Controlling piloted

    Check that the profiles used are enabled.

  4. 4

    Analyze any deactivation

    Disabling must be justified and compensated by a controlled security policy.

Commands utiles

Get-NetFirewallProfile | Select-Object Name, Enabled, DefaultInboundAction, DefaultOutboundAction.

À retenir

  • Avoid deactivating firewalls as a method of sustainable diagnosis.
  • Instead, create a temporary and targeted rule when necessary.
Technical deep dive

Windows Firewall: active profile and effective rule

Technical checkpoints

  • Windows Defender Firewall manages Domain, Private and Public separately; a rule may apply only to selected profiles.
  • Firewall enabled does not mean traffic is blocked: the decision also depends on inbound/outbound rules, scope, program and service.
  • Get-NetFirewallProfile and Get-NetFirewallRule distinguish global state from effective rules.

Check

Identify the active network profile then find the rule matching the port/program.

Get-NetConnectionProfile
Get-NetFirewallProfile
Get-NetFirewallRule -Enabled True

Topic-specific pitfalls

  • Disabling the entire firewall for testing changes too many variables and exposes the host.
  • A GPO can reapply or lock local configuration.

How to validate

  • The active profile is expected and the rule precisely allows required source, destination, port and program.
  • The network test succeeds without globally disabling the firewall.
♡ 0