How To: Firewall Commands In Server Core

  • Section(s): Security, Administration, Admin, Security
  • Published on Jul 01, 2009.
  • Last Modified on Feb 26, 2009.
  • Last Modified by Nirmal Sharma.
  • Rated 1 out of 5 based on 1 votes.
This article explains the commands you can use to operate Windows Firewall in Server Core

Server Core has no GUI tool to perform tasks related to firewall. You need to use NetSH command line tool to make changed to the Windows Firewall. This article lists the useful NetSH commands for Windows Firewall:

NetSH ADVFirewall

The above command is used to list switches available for Windows Firewall operation.

There are three Firewall Profiles configured on Windows Vista and Windows Server 2008. To check the status of Windows Firewall for all three profiles, issue the following commands:

NetSH ADVFirewall Show Allprofiles

The State column will show the firewall status: ON | OFF.

To turn Windows Firewall on for all profiles, issue the following command:

NetSH ADVFirewall Set Allprofiles State ON

Use OFF switch to turn the firewall off with above command.

To reset the Windows Firewall and configure with the default parameters, use the following command:

NetSH ADVFirewall Set Allprofiles FirewallPolicy BlockInbound,AllowOutbound

To enable/disable a specific feature, use the following command: In below example, the Remote Management (WinRM) feature will be enabled.

NetSH ADVFirewall Set AllProfiles Settings remotemanagement Enable / DIsable

 

About Nirmal Sharma

Nirmal is a Microsoft MVP in Directory Services and working as a Technical Architect/Consultant. He has been involved in Microsoft Technologies since 1994 and followed the progression of Microsoft Operating Systems and software. He is specialized in Directory Services, Microsoft Clustering, SQL, MOM, Exchange and Citrix. In his spare time, he likes to help others and write "internal" technical articles, white papers and tips on various Microsoft technologies. You can contact him at nirmal_sharma@mvps.org.


Article not looking right or info is missing? Let us know so that we can fix it: .


Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred network administration tool?