Consult and change the firewall settings on a Windows machine

On a Windows system you can alter the firewall configuration (enable / disable) by using netsh, which is a command-line utility. Consultation of the firewall state can be found by executing the following command: "netsh advfirewall show allprofiles".

C:\Users\rrdhyv8>netsh advfirewall show allprofiles

Domain Profile Settings:
State OFF
Firewall Policy BlockInbound,AllowOutbound
LocalFirewallRules N/A (GPO-store only)
LocalConSecRules N/A (GPO-store only)
InboundUserNotification Enable
RemoteManagement Disable
UnicastResponseToMulticast Enable

LogAllowedConnections Disable
LogDroppedConnections Disable
FileName %systemroot%\system32\LogFiles\Firewall\pfirewall.log
MaxFileSize 4096

De-activating all profiles on the local system can be done with the following command: netsh advfirewall set allprofiles state off.
If you want to change a specific profile:
Commands in this context:
set allprofiles - Sets properties in all profiles.
set currentprofile - Sets properties in the active profile.
set domainprofile - Sets properties in the domain profile.
set global - Sets the global properties.
set privateprofile - Sets properties in the private profile.
set publicprofile - Sets properties in the public profile.

Leave a Reply