Solved

firewall status 2008 R2

Posted on 2013-12-20
4
325 Views
Last Modified: 2014-01-02
is there a command you can run on a windows 2008 R2 server to determine if the local firewall is enabled?
0
Comment
Question by:pma111
4 Comments
 
LVL 10

Expert Comment

by:Monica P
ID: 39731273
You can turn on firewall for the current network profile

netsh advfirewall set currentprofile state on

Turn off firewall for the current profile:

netsh advfirewall set  currentprofile state off

For more refer below links'

http://www.windows-commandline.com/enable-disable-firewall-command-line/

http://www.winhelponline.com/blog/enable-and-disable-windows-firewall-quickly-using-command-line/
0
 
LVL 3

Author Comment

by:pma111
ID: 39731277
rather than turn it on or off, how can you tell if it is currently turned on or not
0
 
LVL 35

Expert Comment

by:Mahesh
ID: 39731341
Just run below command to check current state of private profile, public profile and domain profile for windows firewall

netsh advfirewall show allprofiles state

You can enable or disable firewall for all profiles with below command through elevated command prompt

netsh advfirewall set allprofiles state off  - disable firewall for all profiles
netsh advfirewall set allprofiles state on  - enable firewall for all profiles

Mahesh
0
 
LVL 6

Accepted Solution

by:
Aditya Arora earned 500 total points
ID: 39731418
hello,

please use the below command

>netsh advfirewall show allprofiles

and u get result as below

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

Logging:
LogAllowedConnections                 Disable
LogDroppedConnections                 Disable
FileName                              %systemroot%\system32\LogFiles\Firewall\pfirewall.lo
g
MaxFileSize                           4096


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

Logging:
LogAllowedConnections                 Disable
LogDroppedConnections                 Disable
FileName                              %systemroot%\system32\LogFiles\Firewall\pfirewall.lo
g
MaxFileSize                           4096


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

Logging:
LogAllowedConnections                 Disable
LogDroppedConnections                 Disable
FileName                              %systemroot%\system32\LogFiles\Firewall\pfirewall.lo
g
MaxFileSize                           4096

Ok.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
lync 2013 7 54
Account lockouts 22 68
Robocopy Skipped Directory 12 42
Way to setup network drive share permanently mapped to server 3 44
To effectively work with Diskpart on a Server Core, it is necessary to write some small batch script's, because you can't execute diskpart in a remote powershell session. To get startet, place the Diskpart batch script's into a share on your loca…
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now