Turn Off Windows Firewall Safely—and Back On

Share
A Windows Security firewall settings screen is displayed on a computer monitor.

To turn off Windows Firewall safely in Windows 10 or Windows 11, open Windows Security, select the active network profile, set Microsoft Defender Firewall to Off, run the test, and turn it back on immediately. Disable only the profile involved; do not turn off every profile unless the test specifically requires it. First confirm that Windows Firewall is blocking the app or connection, because a router problem, antivirus rule, incorrect port, or app configuration will not be fixed by disabling the firewall. In most cases, allowing the specific app through the firewall is safer than disabling the firewall entirely.

Before you turn it off, make sure the firewall is really the problem

Before you start, make sure you have the Windows 10 or Windows 11 computer, administrator permission if Windows requests it, and a specific app or connection to test. Plan to restore the firewall as soon as the test ends.

Identify which network profile Windows is using. Open Settings, select Network & internet, and open the connected network. On Wi-Fi, select the Wi-Fi network properties; on Ethernet, select Ethernet. Check whether the network is set to Public or Private. A domain-joined work computer may use the Domain profile.

Then check Windows Security for a blocked-app notification or firewall status:

  • Open Windows Security from the Start menu.
  • Select Firewall & network protection.
  • Look for the profile marked active.
  • Check whether Windows Security reports that the firewall is blocking an app or connection.

If the app appears in a Windows Security prompt, allow it only on the profile it needs. You can also select Allow an app through firewall from the Firewall & network protection page, select Change settings, and enable the app for Private or Public networks as appropriate. Do not enable both profiles unless the app genuinely needs access on both.

A firewall rule usually identifies an app by its executable file. Confirm that you are allowing the legitimate program, not an unfamiliar file with a similar name. If the app already has an allowed-app entry, disabling the firewall is unlikely to solve the issue. Check the app's own settings, its required port, and any third-party security software first.

Before continuing, close unrelated network applications and make a note of the current firewall status. You will use that information to restore the same protection afterward.

A laptop runs a network connection test while Windows Defender Firewall is visible nearby.

How to turn off Windows Firewall in Windows Security

Windows 10 and Windows 11 use nearly the same Windows Security path. You may need administrator permission to change these settings.

Turning off a firewall profile removes a network protection layer. Use the smallest scope possible, and do not disable every profile just to avoid identifying the active one.

  1. Open Windows Security from the Start menu.
  2. Select Firewall & network protection. Windows displays the available profiles: Domain network, Private network, and Public network. The profile currently in use is marked active.
  3. Select the profile that is active for the connection you are testing. If you deliberately need to test another profile, select that profile instead, but do not change the other profiles unnecessarily.
  4. Set Microsoft Defender Firewall to Off. Approve the administrator prompt if Windows displays one. The selected profile page should now show that the firewall is off.
  5. Leave the other profiles enabled unless your test specifically requires them to be disabled. For example, turning off Private network protection does not require turning off Public network protection.

If the switch is unavailable, greyed out, or immediately changes back, an administrator policy or another security product may control the setting. Do not keep retrying by disabling unrelated security features; use the troubleshooting steps below.

A Windows 10 computer displays the Microsoft Defender Firewall profile settings screen.

What can go wrong while the firewall is disabled

Microsoft Defender Firewall filters unwanted inbound and, depending on its rules, outbound network traffic. Turning it off removes that filtering for the selected profile. The risk is much higher on a Public network, such as airport, hotel, café, school, or other shared Wi-Fi, where other devices may be present.

Do not turn off the firewall on an untrusted network unless the test is necessary and tightly controlled. Disconnect from public or unknown networks before testing if you can. While the firewall is off, avoid downloading software, opening unexpected attachments, visiting sensitive services, or using file and printer sharing. Keep the test as short as possible.

If you need to test a local application, prefer a controlled network and make sure the computer is not exposing folders, remote desktop, development servers, or other services to that network. A firewall-off test should answer one question: does the connection work when this protection layer is removed? It should not become a general troubleshooting state.

Allowing a specific app through the firewall is normally safer because the firewall remains active for other traffic. Disabling the firewall may also produce a Windows Security warning, and another antivirus or endpoint-security product may still apply its own rules. That does not make the Windows firewall-off state safe; it only means more than one security layer may be involved.

How to confirm the test worked and turn protection back on

After changing the setting, stay on the selected profile page in Windows Security > Firewall & network protection. Confirm that the same profile you chose is marked active and that its Microsoft Defender Firewall switch says Off. Do not rely only on a general warning in Windows Security, because that warning may not identify which profile changed.

Run only the app or connection test you planned. Record what happened: for example, whether the app connected, whether a local service became reachable, or whether the same error appeared. If the problem remains with the firewall off, turn protection back on; leaving it disabled will not help diagnose a different cause.

  1. Return to Windows Security > Firewall & network protection.
  2. Open the profile whose firewall you disabled. It should still be marked active if you are connected through that profile.
  3. Set Microsoft Defender Firewall to On. The profile page should show that protection is enabled again.
  4. If Windows Security still displays a firewall-off warning, open each profile page and verify the Domain, Private, and Public settings. Re-enable any profile you intentionally changed, then confirm that the warning clears or identifies a separate security issue.
  5. Retry the app with the firewall enabled. If the app fails again, use an allowed-app rule or a narrowly scoped inbound rule rather than leaving the firewall off.

The test is complete when the app or connection result is recorded and the profile you changed shows Microsoft Defender Firewall set to On. Do not postpone the restoration while you work on something else. If you are finished with the test, reconnecting to a different network can also change the active profile, so verify the setting again after changing networks.

The Windows Security page shows the active network profile and its firewall status.

If disabling the firewall does not fix the problem

Turn the firewall back on first. A failed firewall-off test means the cause is elsewhere, or that the test did not reproduce the original conditions. Continue with targeted checks instead of leaving protection disabled.

Check the app's allowed-app entry under Firewall & network protection > Allow an app through firewall. Make sure the rule points to the correct executable and applies to the profile you are using. If the app needs a listening port, confirm the port and protocol in the app's documentation or settings before creating a narrowly scoped rule. Do not open a broad range of ports without a clear reason.

Other common causes include:

  • A third-party antivirus, endpoint-security product, VPN, or network filter blocking the traffic.
  • A router firewall, access-control rule, guest-network isolation, or parental-control setting.
  • Windows network discovery or file-sharing settings that do not match the type of network.
  • The app listening only on localhost, using the wrong IP address, or using a port already occupied by another process.
  • A work or school administrator policy that controls Windows Firewall and prevents local changes.

If Windows Firewall cannot be turned off, turns itself back on, or the controls are greyed out, check Windows Security > Settings > Manage providers for another security product and ask the device administrator whether policy controls the firewall. The exact message varies. On a managed computer, do not try to bypass that policy.

If the issue is limited to one app, remove any temporary test changes, restart the app, and use its logs or connection diagnostics. If the issue affects several devices, investigate the router or network. If only one managed Windows computer is affected, the administrator may need to review the firewall policy and event logs.

Conclusion

Use firewall-off mode only as a short diagnostic test on a controlled connection. Select the one profile involved, confirm that profile is marked **active**, test the app immediately, and switch Microsoft Defender Firewall back on before you resume normal browsing or connect to another network. If the test changes nothing, keep protection enabled and trace the allowed-app rule, antivirus, router, network profile, or administrator policy instead.

Frequently Asked Questions

Is it safer to allow an app through Windows Firewall than to turn off the firewall?

Usually, yes. An allowed-app rule can give one program the access it needs while the firewall continues filtering unrelated traffic. Enable only the correct app and only the Private, Public, or Domain profile that the app requires. Verify the executable before allowing it.

Why does Windows Firewall turn itself back on after I disable it?

A security policy, administrator setting, or security product may be enforcing the firewall state. On a work or school device, the setting may be managed centrally. Check **Windows Security > Settings > Manage providers** for another security provider and contact the device administrator rather than trying to bypass the policy.

What should I do if the app still does not work with the firewall off?

Turn the firewall back on. Check the app's configuration, listening port, VPN or antivirus rules, router settings, network discovery, and the active Windows network profile. A firewall-off test that changes nothing points away from Windows Firewall; remove temporary test changes and use the app's logs or connection diagnostics.

Read more