Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


July 19, 2004

Windows Firewall Basics

Defense in depth
RSS
Subscribe to Windows IT Pro | See More Antivirus Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Windows Firewall also lets you loosely define traffic based on its source. So, for example, you can permit other company computers to access a particular computer. Windows Firewall lets you define source IP addresses as Any computer, My network (subnet) only, or Custom list. The My network (subnet) only option specifies the network segment on which the client is installed. If you want to allow file sharing between computers within your company, you can define discrete port rules (such as allowing TCP ports 135 to 139 and port 445), and you can define rules based on source address (such as all computers on the corporate LAN). The Custom list option lets you specify a series of IP addresses or IP address ranges and subnet masks (e.g., 192.168.0.0/255.255.255.0, 192.168.0.10). Allowing multiple subnets and subnetted networks is a boon to midsized and large organizations that use custom subnetting.

Installing and Configuring the Windows Firewall Client
Installing XP SP2 automatically installs the Windows Firewall client and enables the firewall on all network adapters. Later, I show you how to turn off Windows Firewall before you install SP2, which is useful if you already run a third-party host-based firewall.

You locally manage Windows Firewall for all adapters by using the new Control Panel Windows Firewall applet, which Figure 1 shows. You must be a member of the local administrators group to manage the Windows Firewall settings for a computer.

Windows Firewall has three operating states: On (the default), Don't allow exceptions, and Off. As you can guess, Off disables the firewall entirely. Windows Firewall introduces the concept of exceptions, which are simply another name for ACL entries. When you use the firewall in the On state, the firewall protects your computer by using the rules that you define via the Windows Firewall applet Exception tab. However, you can also set the firewall to Don't allow exceptions. In this On mode, the computer blocks all inbound unsolicited communications, with no exceptions. Outbound connections and solicited connections are still permitted.

Configuring Windows Firewall consists primarily of defining the firewall exceptions. To locally manage the exceptions, open the Windows Firewall applet and go to the Exceptions tab, which Figure 2 shows. The Exceptions tab lets you define which applications or ports will be allowed through the firewall.

Windows Firewall manages all network connections for the computer on which it's installed; however, you can disable the firewall for specific adapters by using the Advanced tab. The other configuration options on the Advanced tab let you configure logging and specify rules for allowing Internet Control Message Protocol (ICMP) traffic.

Using Group Policy to Manage Windows Firewall
One of Windows Firewall's most powerful enhancements is the ability to use Group Policy to manage client configurations. You can use Group Policy to configure all your firewall exceptions from one location and apply them to all target computers. You can also configure different firewall configurations for specific groups of users. For example, you might create an organizational unit (OU) named Sales_Laptops that contains all your Sales department laptops. Then you can create a new Group Policy Object (GPO) that enables Windows Firewall on only these computers. The settings are activated when the computers in this OU refresh the GPO. This method lets you specify standard Windows Firewall settings for any domain, site, or OU. A Windows Firewall GPO applies only to XP SP2 computers covered by that GPO.

You can access the new Windows Firewall GPO elements by creating a GPO from an XP SP2 computer. In Group Policy Editor, the Windows Firewall GPO elements are located under Computer Configuration, Administrative Templates, Network, Network Connections, Windows Firewall. If you elect to use Group Policy to manage Windows Firewall, you can effectively block a user from making any local changes--even if the user is a local administrator. The Allow Local Port Exceptions GPO lets you specify whether you want to let local administrators make Windows Firewall port changes on a local computer. Web Figure 1 lists the new Windows Firewall GPOs.

Managing Windows Firewall from the Command Line
You can also manage Windows Firewall clients via the Netsh command-line tool. You can use Netsh to configure network settings through a batch file or directly from the command line. For example, the command

netsh firewall show config

displays the current settings of the Windows Firewall client, as Figure 3 shows. Netsh lets you configure most Windows Firewall settings--good news for scripters, who can now use a logon script to configure and verify Windows Firewall operation.

For example, the following Netsh command will create a local firewall rule to allow certain addresses to telnet into a Windows Firewall-protected computer:

netsh firewall add portopening
  protocol = TCP port = 23
  name = Telnet mode = ENABLE
  scope = CUSTOM addresses =
  192.168.0.0/255.255.255.0,
  10.0.0.0/255.255.240.0

You can also shorten the command by dropping the attribute names, as the following example shows:

netsh firewall add portopening
  TCP 23 Telnet ENABLE CUSTOM
  192.168.0.0/255.255.255.0,
  10.0.0.0/255.255.240.0

You can view the results of the above command by using the command

netsh firewall show portopening

For more information about using Netsh, see Related Reading.

Domain Profiles vs. Standard Profiles
Another useful Windows Firewall feature is its ability to choose from two security states--standard and domain--depending on which network the computer is connected to. You can configure unique exceptions for each state. For example, you might permit file sharing only while the computer is connected to the domain. Windows Firewall compares the currently connected AD domain name (if one exists) with the IP configuration DNS suffix to determine whether to use the domain or standard profile. To configure the domain and standard profiles, go to the Windows Firewall GPO and select the one you want to configure.

   Previous  1  [2]  3  Next 


Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Accessing Database Data with ADO

...

The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...


Security Whitepapers Protecting (You and) Your Data with Exchange Server 2007

Extended Validation SSL Certificates

Unauthorized applications: Taking back control

Related Events Check out our list of Free Email Newsletters!

Security eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

Related Security Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Maximize your SharePoint Investment – 8 Cities
Discover best practices and tips for both architecting and administering SharePoint. Early Bird Price of $99 through Sept 15th.

Find a new job now on the all new IT Job Hound!
Search jobs, post your resume, and set up job e-mail alerts!

Master SharePoint with 3 eLearning Seminars
Learn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today!

Top Tools for Virtualization Disaster Recovery & Replication
View this web seminar on August 14th to learn about two tools that will result in faster backup and restore with P2V disaster recovery.

SharePointConnections Conference Fall 2008
Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).

VMworld 2008 - Sign Up Today!
Join your peers on September 15-18 at The Venetian Hotel in Las Vegas as VMware hosts VMworld 2008, the leading Virtualization event.



Increase Application Performance
Free White Paper by Editor's Best winner, Texas Memory Systems.

Microsoft® Tech•Ed EMEA 2008 IT Professionals
Advance your thinking with new ideas and practical real-world solutions at Microsoft’s FIVE day technical infrastructure conference 3-7 Nov., 2008. Register before 26 September 2008 to save €300.

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

Are You Really Compliant with Software Regulations?
View this web seminar that will help you with compliance best practices and check out a management solution to assure that you won’t be in jeopardy of an audit.

Virtualization Congress Oct. 14-16 in London
Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technical Resources Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing