/
/

How to Enable or Disable “Block All Incoming Connections” in Windows Firewall

by Stela Panesa, Technical Writer
How to Enable or Disable “Block All Incoming Connections” in Windows Firewall blog banner image
How to Enable or Disable “Block All Incoming Connections” in Windows Firewall blog banner image

Key Points

  • Enables a Windows Firewall setting that blocks all unsolicited inbound traffic, overriding allowed app exceptions while permitting outbound connections.
  • Requires administrator privileges and applies separately to each network profile: Domain, Private, or Public.
  • Configures through Windows Security, Control Panel, PowerShell (Set-NetFirewallProfile), or Command Prompt (netsh advfirewall).
  • This setting suits public networks, incident response, and temporary endpoint lockdowns, so avoid leaving it on if remote access, such as RDP or file sharing, is needed.
  • Use PowerShell or an RMM tool like NinjaOne enforce this setting at scale across managed endpoints.

You can enable or disable “Block all incoming connections” in Windows Firewall through Windows Security, Control Panel, PowerShell, or Command Prompt. The setting applies separately to your Domain, Private, and Public network profiles. Turning it on blocks all unsolicited inbound connections, including those your normal firewall rules would allow, without affecting outbound traffic.

Manual checks alone cannot eliminate IT threats.

→ Fortify your stack with NinjaOne

How to block all incoming connections in Windows Firewall

There are several methods to enable or disable the “Block all incoming connections” feature in Windows Firewall.

Prerequisites:

  • Each method outlined below applies to all editions of Windows 11.
  • You need administrative rights to configure Windows Firewall.
  • This firewall setting can be configured separately for each network profile: domain, private, and public.

Recommended deployment strategies:

Click to Choose a Method

Best for Individual Users

Best for Enterprises

Method 1: Via Windows Security✓
Method 2: Via the Windows Defender Firewall Control Panel✓
Method 3: Using PowerShell✓
Method 4: Via Command Prompt✓

Important: Enabling the Block all incoming connections setting may block remote desktop and file sharing. This firewall setting is best suited for temporary use. It is also useful when you need to harden endpoint security on your remote devices.

Catch all four methods demonstrated on screen — How to Enable or Disable “Block All Incoming Connections” in Windows Firewall.

Method 1: Enable or disable via Windows Security (GUI)

Use Case: This method quickly enables or disables blocking for a single active profile.

  1. Open Settings > Privacy & security > Windows Security > Firewall & network protection
  2. Click the active network profile you want to configure (e.g., Private network or Public network)
  3. Scroll down to Microsoft Defender Firewall
  4. Toggle Block all incoming connections, including those in the list of allowed apps:
    • On = Block unsolicited incoming connections.
    • Off = Allow inbound connections per defined rules.

Once done, your changes will take effect immediately.

Method 2: Configure via the Windows Defender Firewall Control Panel

Use Case: This method is ideal for configuring all network profiles at once.

  1. Open Control Panel > System and Security > Windows Defender Firewall.
  2. Click Advanced settings.
  3. In the left pane, select Windows Defender Firewall Properties and navigate to the Settings section for each profile.
  4. Under Inbound connections, click Block all connections, then select OK to apply the changes.

Note: You can use Group Policy to enforce this firewall setting on domain-joined devices.

Method 3: Enable or disable using PowerShell

Use Case: This method configures your firewall settings by using the following scripts:

Enable block all incoming on Public profile:

Set-NetFirewallProfile -Profile Public -DefaultInboundAction Block -AllowInboundRules False

Disable block all incoming (allow defined rules):

Set-NetFirewallProfile -Profile Public -AllowInboundRules True

Apply to all profiles:

Set-NetFirewallProfile -All -AllowInboundRules False

Combine with -Verbose for real-time confirmation.

Method 4: Configure via Command Prompt (netsh)

Use Case: This method is ideal when you can’t reset the firewall settings via the GUI.

Use this command to enable the Public profile:

netsh advfirewall set publicprofile firewallpolicy blockinboundalways,allowoutbound

To disable “block all incoming” (allow rule-based exceptions), enter:

netsh advfirewall set publicprofile firewallpolicy blockinbound,allowoutbound

To apply to all profiles (for example, Private), enter:

netsh advfirewall set privateprofile firewallpolicy blockinboundalways,allowoutbound

Note: Use Event Viewer or Get-NetFirewallRule to verify if the new policies have been applied to your selected network profile.

Elevate network security with real-time visibility and IT automation.

→ Start your free trial today

The benefits of locking all incoming connections

Enabling the Block all incoming connections setting in Windows Firewall can:

  • Strengthen your computer’s cybersecurity. This is crucial whenever it connects to public or guest networks.
  • Temporarily lock down devices during security events like an audit.
  • Restrict access to services that may have open inbound rules.
  • Keep your devices secured in kiosk or VDI scenarios.

Quick-Start Guide

NinjaOne can manage Windows Firewall settings, including enabling or disabling “Block All Incoming Connections.” Here’s how:

1. Scripts

  • Use the Windows Script tool to run PowerShell commands that modify firewall profiles.
  • NinjaOne includes built-in scripts (search “Windows Firewall”) that you can customize.

2. Policies

  • Assign scripts to target devices via Policies.
  • Schedule automated deployments for recurring updates.

3. Device Dashboard

  • Access individual device settings via the Device Dashboard.
  • Use the Settings > Windows Firewall section to toggle “Block All Incoming Connections” manually.

4. Activity Log

Monitor script execution and changes in the Activity Log for transparency and troubleshooting.

5. Remote Tools

Use Remote Tools to verify firewall settings in real time on any device.

These tools allow you to centrally manage firewall configurations across your entire fleet, ensuring consistency and security.

Enabling the “Block all incoming connections” setting to strengthen your cybersecurity posture

Now that cyber threats are becoming more sophisticated, a feature like the “Block all incoming connections” setting in Windows Firewall has never been more important.

This configuration will protect your computer from harmful, unwanted traffic without disrupting your outbound communications. It’ll allow you to work in unsecured environments with greater peace of mind.

Related Topics:

FAQs

This firewall setting blocks all unsolicited attempts to connect to your computer, regardless of their origin. It simply ignores all apps, including those in your allowed apps list.

Enable the “Block all incoming connections” setting in Windows Security, Control Panel, PowerShell, or Command Prompt, depending on whether you’re configuring one device or multiple devices. Each method blocks unsolicited inbound traffic while leaving outbound connections unaffected.

“Block all incoming connections” applies only to the active Windows Firewall network profile. It must be configured separately for Domain, Private, and Public networks. Enabling it on one profile does not affect the others, allowing tighter security on untrusted networks (like Public) without disrupting trusted environments.

You might also like

Ready to simplify the hardest parts of IT?