1
Thanks

A few words of thanks would be greatly appreciated.

Enable or Disable The Firewall Command Line on Windows XP

You might need to switch off the Windows firewall temporarily. To quickly disable or enable the Windows firewall during network connectivity testing, or when working on other troubleshooting tasks, use the Netsh.exe command-line on Windows XP. Configure the firewall from the command prompt by implementing the Netsh command. Follow the steps below to learn how to do so.




With the command line

Under Windows XP SP2, it is possible to enable or disable the firewall with the following command lines.

First open the command prompt: (Windows + R keys) and type : cmd
  • Disable the Windows XP firewall:
    • netsh firewall set opmode disable
  • Enable the Windows XP firewall:
    • netsh firewall set opmode enable


Validate with the Enter key.

With a.BAT file

It is also possible to create a batch file (with extension. Bat) incorporating one of these commands to enable or disable the firewall by simply double-clicking.

You can create a batch file to enable or disable the firewall by double-clicking on Notepad and inserting one of two lines above, then saving the file with the .bat extension (ex: Activatefirewall.BAT).


To go further you can create two files on the desktop, to enable and disable the firewall:
  • Click on Start/All Programs/Accessories/Notepad (or Start/Run/notepad/[OK])
  • Add the command:
    • netsh firewall set opmode disable
  • Click on File/Save As
  • In "File name" write "Disablefirewall.BAT"
  • Save directly on your desktop
  • Double-click this file to disable the firewall in Windows XP
  • Repeat the above operation, but now using the command
    • netsh firewall set opmode enable
  • In "File name" write "Activatefirewall.BAT"
  • Save directly on your desktop
  • Double-click this file to activate the firewall in Windows XP



Image: © 123RF.com
1
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.

Related

This document, titled « Enable or Disable The Firewall Command Line on Windows XP », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).