Turn Off Windows Firewall with Regedit

Article by Christian Cawley (19,243 pts ) , published Sep 6, 2009

It is relatively simple to utilize the power of the Windows System Registry and disable the Windows Firewall following these clear steps.

Why Use Regedit?

There are a number of occasions in which you might want to disable the Windows Firewall, but find that accessing the function via a "regedit" command to open the System Registry is preferable to accessing the Windows Firewall system via Control Panel. For instance, you might be a Domain Admin who has disabled standard user access to the Windows Firewall interface in the operating system. However, you wish to save time in disabling the firewall for some form of testing or installation.

This user guide explains how the Windows Firewall can be easily and quickly disabled via regedit.

Why Use This Method?

Reasons why you might use Regedit over the standard method of disabling the Windows firewall might include:

  • To save time
  • Uninstalling a third-party firewall application has disrupted the Windows Firewall
  • You are providing support to a third-party product that requires disabling the firewall, but the Windows Firewall is not accessible
  • You require the firewall disabling as part of a batch file you’re compiling
  • You need to make a standard alteration and you are accessing a remote users registry directly via the Registry Editor’s Connect Network Registry function

Disabling the Windows Firewall

In order to turn off the Windows Firewall in the Registry Editor, the correct key must be amended.

Go to Start > Run and type regedit at the insertion point.

In the Registry Editor, go to Edit > Find and paste the following path (Windows XP SP3) then click OK

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile

The Reg_DWORD value EnableFirewall can be edited, with an amendment to the Value Data setting of 0. By changing this to 1, the Windows Firewall will be disabled.

For Windows XP SP2, the Reg_DWORD value EnableFirewall can be accessed via the following registry entries, depending upon your environment:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\StandardProfiles

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsFirewall\DomainProfiles

Again as with the Service Pack 3 solution, the Value Data setting of 0 should be changed to 1 in the Reg_DWORD value EnableFirewall.

Further Notes

Note that upon disabling the Windows Firewall, a System Tray balloon will appear, advising you that the Windows Firewall has been disabled. With a third-party firewall or security application installed, this balloon can be dismissed by going to Control Panel > Security Center and informing Windows that a firewall is installed.

Note also that access to the registry depends on the privileges of the logged-in user. If the Administrator is not logged in, browse to C:\Windows\System32 and find the regedt32.exe file. Right-click, select Run As... and enter the admin username and password.

Before disabling the Windows Firewall, it is vital to ensure that it is both safe to do so and if it isn’t, that a suitable replacement has been installed and configured already.

Comments

Sep 21, 2009 6:07 PM
zeug
Thanks !
Your article saved me hours.
I had a distant win 2003 server and I lost exceptions on firewall, so no way to connect to it anymore (only had ssh access) !

I just had the access to a boot on a light Win PE console (rescue console).
I succeeded launching regedit there, import SYSTEM hive (C:\windows\System32\Config\system), modify the keys you gave, re-export to replace SYSTEM HIVE, and reboot ... and it worked perfectly !!!

Not an easy and not risky manipulation, but the only before reformat ... so thanks !
Sep 6, 2009 10:32 PM
DaveUK
Bad idea and unnecessary!!
I don't know where to start with this article! This is really bad advice :(

Using the registry to control the Windows Firewall is not recommended. There are plenty of fully supported and *recommended* ways to control the Windows Firewall without using the firewall.cpl or wf.msc UI. Not to mention, the examples you have given above are specific to Windows XP. In Vista/Windows 7 there is also a "public" profile in addition to the standard and domain profiles.

So...given that you shouldn't be using the registry to modify the firewall - what other options do you have? Well...WIndows Firewall provides a wealth of command line configuration options through it's Netsh context:

netsh advfirewall help

http://technet.microsoft.com/en-us/library/cc770887%28WS.10%29.aspx

If you are on XP then you will want to use the "netsh firewall" context instead (advfirewall is only available on Vista+)

Using netsh is preferable to hacking the registry directly and is far less error prone. When you adjust the registry, the firewall service (mpssvc) does not always automatically re-read the configuration - therefore you may find that your registry changes do not always take immediate effect. However, netsh commands are effective immediately. Also, the registry schema for Windows Firewall is subject to change at any time with future releases of Windows or service packs.

If you don't want to use netsh - then you should be using the rich Windows Firewall COM API's which allow you to use vbscript, c++, c# etc - to control the Firewall:

http://msdn.microsoft.com/en-us/library/aa366453%28VS.85%29.aspx
 
Sponsors
 
Camtasia: record, save, share!
Record onscreen activity, your voice, and webcam video. See how great your presentation videos can look with Camtasia screen recording software!