Information Technology Reference
In-Depth Information
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
SharedAccess\Parameters\FirewallPolicy\DomainProfile\]
"EnableFirewall"=dword:1
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
SharedAccess\Parameters\FirewallPolicy\StandardProfile\]
"EnableFirewall"=dword:1
To disable the Windows Firewall, set both of the previous Registry entry values to 0 . You do
not need to reboot after making these changes.
Using VBScript
This code enables or disables the Windows Firewall on the local computer.
' ------ SCRIPT CONFIGURATION ------
boolEnabled = TRUE ' FALSE to disable
' ------ END CONFIGURATION ---------
Set firewall = CreateObject("HNetCfg.FwMgr")
Set firewallPolicy = firewall.LocalPolicy.CurrentProfile
firewallPolicy.FirewallEnabled = boolEnabled
WScript.Echo "Firewall enabled: " & boolEnabled
How It Works
The original Release To Manufacturing (RTM) version of the Windows Server 2003 operating
system came preloaded with the Internet Connection Firewall (ICF), which provided a simple
host-based firewall for the 2003 operating system. The drawback to ICF was that it was not
enabled by default when 2003 was first installed, and it was fairly unintuitive to enable and
configure. Windows Server 2003 Service Pack 1 (SP1) made some significant improvements to
ICF, which was renamed the Windows Firewall. The Windows Firewall is now enabled when
the operating system first boots, and you can make extensive configuration choices through
netsh and Group Policy. We'll examine the Windows Firewall in depth in Chapter 3.
See Also
￿
Chapter 3 for more on Windows Firewall
Microsoft TechNet: “Administering Windows Firewall” ( http://www.microsoft.com/
technet/prodtechnol/windowsserver2003/library/Operations/
56b0f52e-61c0-4b85-99cb-911ea7b8bafe.mspx )
￿
1-18. Enabling or Disabling TCP/IP Filtering
Problem
You want to enable or disable TCP/IP filtering on a Windows Server 2003 computer.
Search WWH ::




Custom Search