Enable and Disable Windows Firewall Quickly using Command-line
When testing network connectivity or when performing other troubleshooting tasks, you may need to turn off the Windows Firewall temporarily. To quickly disable or enable the Windows Firewall, you may use the Netsh.exe command-line in Windows XP and Windows Vista.
Enabling Windows Firewall
Click Start, Run and type:
Disabling Windows Firewall
Click Start, Run and type:
Windows Firewall status can be verified using Windows Security Center or the Windows Firewall applet.
Note: In Windows Vista you need to run the above commands from an elevated Command Prompt. To open an elevated Command Prompt, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
You may create desktop two shortcuts to enable and disable the Windows Firewall. To run the commands as administrator, right-click on the shortcut and choose Run as administrator. Or right-click the shortcut properties, click Advanced and tick the Run as administrator checkbox and click OK. Double-clicking the shortcut run the Netsh… command elevated, after you click the Continue button in the UAC confirmation dialog.
Customize the shortcut icons by picking an appropriate icon from Shell32.dll, Imageres.dll or from xpsp2res.dll (for Windows XP) for easy identification.
Editor’s Note: Although the netsh firewall command works fine in Windows XP, Windows Vista and Windows Server 2008 Operating Systems, Microsoft recommends that you use the netsh advfirewall firewall command in Windows Vista and Windows Server 2008.
The netsh firewall command-line context might be deprecated in a future version of the Windows operating system. We recommend that you use the netsh advfirewall firewall context to control firewall behavior.
For more information. see article KB947709 titled "How to use the “netsh advfirewall firewall” context instead of the “netsh firewall” context to control Windows Firewall behavior in Windows Server 2008 and in Windows Vista."
RELATED POSTS
- How to Enable or Disable Aero in Windows Vista
- Security Center not reporting Anti-virus or firewall status correctly
- Remove, Disable and Enable buttons are grayed out in Windows Defender
- Analyze and Defragment buttons in Disk Defragmenter do not work
- Configure Task Manager to display full path of running processes
- Enable or Disable Thumbnail Preview for PDF Files
- Know which devices can wake up your PC from Sleep mode
- Enable and Disable built-in CD Burning Features in Windows Vista
- Error “Remote Desktop Web Connection ActiveX control could not be installed” after installing Windows XP SP3
- How to run programs elevated without getting the UAC Prompt
BOOKMARK THIS PAGE
BlinkList | del.icio.us | Digg it | Furl | ma.gnolia | Newsvine | reddit | Spurl | Wink |


If you enjoyed this post, make sure you
Prefer an E-mail subscription?