Enabling/Disabling the firewall using command line

Last update on October 17, 2009 03:30 PM by jak58
Published by netty5

Enabling/Disabling the firewall using command line






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

Disable Windows XP firewall


netsh firewall set opmode disable

Enable the Windows XP firewall


netsh firewall set opmode enable

We create a batch file to enable or disable the firewall by simply double-clicking on the pad by inserting one of two lines above, then saving the file giving the extension .bat (ex: Activatefirewall.BAT).
Best answers for « Enabling/Disabling the firewall using command line » in :
Start/stop a service using command line Show Start/stop a service using command line The netsh tool (netsh.exe) can automate the startup or shutdown of a service through the following command line: To start a service: Net start name_of_service To stop a service:...
Enable/Disable the print spooling service Show Enable/Disable the print spooling service Issue Solution Issue The print spooling service allows you to load the print jobs for later printing, ie to put them in the print queue. It may also be the solution after the failure of...
[Windows XP] Repairing the network connection using command line Show [Windows XP] Repairing the network connection using command lines Under Windows XP there is a small feature allowing you to repair a network connection. Go to the Network Connections options in Control panel (Control Panel / Network...
[Linux]Restarting the network interface using command lines Show[Linux]Restarting the network interface using command lines When setting up a network, specially if you need to verify that a DHCP server assigns IP addresses correctly, restarting the network interface using command lines rather than the...
List of open ports in command line ShowList of open ports in command line Whether you're running Windows or Linux / Unix, the following command in (console) will display the list of open ports on your computer: netstat -a For the use of advanced graphics tools, see What...
ImageMagick - Manipulate images with command lines ShowImageMagick - Manipulate images with command lines ImageMagick is a powerful command line tool that allows you to manipulate images. The advantage of this tool is that it allows: Automate work on images (this avoids...
Firewall ShowFirewall Each computer that is connected to the Internet (and, more generally, to any computer network) is likely to become a victim of a computer attack by a hacker. The methodology generally used by hackers consists in scanning the network (by...
Linux - The shell ShowIntroduction to the shell The command interpreter is the interface between the user and the operating system, hence the name "shell". The shell therefore acts as an intermediary between the operating system and the user thanks to command lines...
Network tests and diagnostics ShowTesting the IP configuration Before doing anything else, you are advised to check the computer's IP configuration. Windows systems offer a command-line tool, called ipconfig, that lets you find out your computer's IP configuration. The output of...