# How to disable the Windows firewall using the command shell



## anggwaponi

*(1) netsh -r commander <enter>*

(2) it now shows this line,

[commander] netsh>

but before to that, their is a line that says, " ... _WARNING: Could not obtain host i_
_s may not be available._
_The RPC server is unavailable_ ... ".

*what's this statement suppose to mean then ... any significant or effect perhaps to the commands i'm going to issue?*

*(3) i now tried to issue the command*, _netsh firewall set opmode mode = disable_ <enter>

but here what the result says, " ... _The following command was not found: netsh firewall set opmode mode = disable_ ... ".

*(4) what was wrong with the command i issue?*

hoping to be enlighten.

thanks


----------



## TheOutcaste

anggwaponi said:


> _The RPC server is unavailable_ ... ".
> 
> *what's this statement suppose to mean then ... any significant or effect perhaps to the commands i'm going to issue?*


This could mean you haven't enabled the Allow Remote Administration exception policy on the target machine. This might be needed for some commands to function properly.
Start "gpedit.msc" snap-in. Navigate to *Computer Configuration | Administrative Templates | Network | Network Connections | Windows Firewall*
Choose Domain or Standard as needed, and enable the following: Allow Remote Administration Exception
Be sure to specify an appropriate subnet, or just the IP addresses you need to access the PC from.


anggwaponi said:


> *(3) i now tried to issue the command*, _netsh firewall set opmode mode = disable_ <enter>


As you are already in the netsh interface, don't include that as part of the command. Just use _firewall set opmode mode = disable_ <enter>

HTH

Jerry


----------



## cybertech

Thread re-opened by original poster request.


----------



## anggwaponi

cybertech said:


> Thread re-opened by original poster request


hello cybertech :up:

thanks for allowing my thread to be post again or be in active ... yur just the man 

cheers!


----------



## cybertech

My pleasure! It will auto close again in 45 days. (hint, hint)


----------



## anggwaponi

TheOutcaste said:


> This could mean you haven't enabled the Allow Remote Administration exception policy on the target machine. This might be needed for some commands to function properly.
> Start "gpedit.msc" snap-in. Navigate to *Computer Configuration | Administrative Templates | Network | Network Connections | Windows Firewall*
> Choose Domain or Standard as needed, and enable the following: Allow Remote Administration Exception
> Be sure to specify an appropriate subnet, or just the IP addresses you need to access the PC from.
> 
> As you are already in the netsh interface, don't include that as part of the command. Just use _firewall set opmode mode = disable_ <enter>
> 
> HTH
> 
> Jerry


hello Jerry 

can i possibly initiate this command:

_*netsh*>*firewall set opmode mode = disable*_ <enter>

from my local PC to remotely unblock the firewall of remote PC? if so, what must be the usual synthax prior to issuing the said command?? 

cheers! 

p.s.

@ cybertech

hope u can also extend some extra days :up:


----------



## cybertech

As long as you guys are posting it resets the 45 days. 

In other words 45 days of inactivity will result in the closure.


----------



## TheOutcaste

I thought I'd used netsh remotely before, but I must have been using a Remote Desktop Connection, or a VNC connection. Per Microsoft, the Windows Firewall does not support any remote configuration. To change settings you can use a Group Policy (local or domain), or run netsh on the machine, either locally, or via a Remote Desktop Connection.

[webquote="http://msdn.microsoft.com/en-us/library/aa389286(VS.85).aspx"]When obtaining data from a remote computer, WMI must establish a DCOM connection from Computer A (the local computer) to Computer B (the remote computer)this is shown in the diagram as Connection 1. To establish this connection, both Windows Firewall and DCOM on Computer B must be configured appropriately. The configuration must be done locally on Computer B either by changing the Group Policy settings, by executing NETSH commands, or by executing a script locally. *Windows Firewall does not support any remote configuration*.
[/webquote]

So you can't disable it remotely -- wouldn't be much of a firewall if you could. You can't even view the settings using netsh -- netsh firewall is not available when connected to another machine.

HTH

Jerry


----------



## anggwaponi

TheOutcaste said:


> I thought I'd used netsh remotely before, but I must have been using a Remote Desktop Connection, or a VNC connection. Per Microsoft, the Windows Firewall does not support any remote configuration. To change settings you can use a Group Policy (local or domain), or run netsh on the machine, either locally, or via a Remote Desktop Connection.
> 
> [webquote="http://msdn.microsoft.com/en-us/library/aa389286(VS.85).aspx"]When obtaining data from a remote computer, WMI must establish a DCOM connection from Computer A (the local computer) to Computer B (the remote computer)this is shown in the diagram as Connection 1. To establish this connection, both Windows Firewall and DCOM on Computer B must be configured appropriately. The configuration must be done locally on Computer B either by changing the Group Policy settings, by executing NETSH commands, or by executing a script locally. *Windows Firewall does not support any remote configuration*.
> [/webquote]
> 
> So you can't disable it remotely -- wouldn't be much of a firewall if you could. You can't even view the settings using netsh -- netsh firewall is not available when connected to another machine.
> 
> HTH
> 
> Jerry


ahhhhh .. i see 

well, thanks really for the very enlightenment explanation Jerry ... yur just the man :up:

but *is their such a way i can possibly disable the Firewall using third (3rd) part software?* 

hmmmmm ...

cheers!


----------

