Home > Articles > Certification > Microsoft Certification

This chapter is from the book

Windows Firewall

Windows Firewall is a packet filter and stateful host-based firewall that allows or blocks network traffic according to the configuration. A packet filter protects the computer by using an access control list (ACL), which specifies which packets are allowed through the firewall based on IP address and protocol (specifically the port number). A stateful firewall monitors the state of active connections and uses the information gained to determine which network packets are allowed through the firewall. Typically, if the user starts communicating with an outside computer, it remembers the conversation and allows the appropriate packets back in. If an outside computer tries to start communicating with a computer protected by a stateful firewall, those packets are dropped automatically unless access was granted by the ACL.

Compared to Windows Firewall introduced with Windows XP SP2, the Windows Firewall used with Windows Server 2008 has some major improvements, including the following:

  • Windows Firewall supports IPv6 connection filtering.
  • By using outbound packet filtering, you can help protect the computer againt spyware and viruses that attempt to contact outside computers.
  • With the advanced packet filter, rules can also be specified for source and destination IP addresses and port ranges.
  • Rules can be configured for services by the service name chosen from a list, without needing to specify the full path filename.
  • IPSec is fully integrated with Windows Firewall, allowing connections to be allowed or denied based on security certificates, Kerberos authentication, and so on. Encryption can also be required for any kind of connection.
  • A new management console snap-in named Windows Firewall with Advanced Security provides access to many advanced options and enables remote administration.
  • You can use separate firewall profiles for when computers are domain-joined or connected to a private or public network.

Basic Configuration

Windows Firewall is on by default. When Windows Firewall is on, most programs are blocked from communicating through the firewall. If you want to unblock a program, you can add it to the Exceptions list (on the Exceptions tab). For example, you might not be able to send photos in an instant message until you add the instant messaging program to the Exceptions list. To add a program to the Exceptions list, click the Add program button and select it from the available list or browse for it by clicking the Browse button.

To turn on or off Windows Firewall, follow these steps:

  1. Open Windows Firewall by clicking the Start button, clicking Control Panel, clicking Security, and then clicking Windows Firewall.
  2. Click Turn Windows Firewall On or Off (see Figure 5.3). If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

    Figure 5.3

    Figure 5.3 Windows Firewall options in the Control Panel.

  3. Click On (recommended) or Off (not recommended) and then click OK.

If you want the firewall to block everything, including the programs selected on the Exceptions tab, select the Block All Incoming Connections check box. Block All Incoming Connections blocks all unsolicited attempts to connect to your computer. Use this setting when you need maximum protection for your computer, such as when you connect to a public network in a hotel or airport, or when a computer worm is spreading over the Internet. With this setting, you are not notified when Windows Firewall blocks programs, and programs on the Exceptions list are ignored.

The Windows Firewall Settings interface has three tabs:

  • General: Enables you to turn Windows Firewall on and off, as well as to block all incoming connections, no matter how you have configured the exceptions.
  • Exceptions: Enables you to configure programs and ports for which you want to allow communication into and out from your Windows Vista computer. Only create an exception that is specifically required, and remove exceptions that you no longer need. Never create an exception for a program when you are unsure of the functionality of that program.
  • Advanced: Enables you to select the network interfaces that you want Windows Firewall to protect.

To configure programs as exceptions,

  1. Open Windows Firewall by clicking Start > Control Panel > Security > Windows Firewall.
  2. Click Allow a program through Windows Firewall. If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
  3. In the Windows Firewall dialog box, select the Exceptions tab and then click Add Program.
  4. In the Add A Program dialog box, select the program in the Programs list or click Browse to use the Browse dialog box to find the program.
  5. By default, any computer, including those on the Internet, can access this program remotely. To restrict access further, click Change Scope.
  6. Click OK three times to close all open dialog boxes.

To open a port in Windows Firewall,

  1. Open Windows Firewall by clicking the Start button, clicking Control Panel, clicking Security, and then clicking Windows Firewall.
  2. Click Allow a program through Windows Firewall. If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
  3. Click Add port.
  4. In the Name box, type a name that will help you remember what the port is used for.
  5. In the Port number box, type the port number.
  6. Click TCP or UDP, depending on the protocol.
  7. By default, any computer, including those on the Internet, can access this program remotely. To change scope for the port, click Change scope, and then click the option that you want to use. (“Scope” refers to the set of computers that can use this port opening.)
  8. Click OK two times to close all open dialog boxes.

Windows Firewall with Advanced Security

Similar to the Windows Firewall with Advanced Security introduced in Windows Vista, the Windows Firewall with Advanced Security in Windows Server 2008 is a Microsoft Management Console (MMC) snap-in that allows you to set up and view detailed inbound and outbound rules and integrate with Internet Protocol security (IPSec).

The Windows Firewall with Advanced Security management console enables you to configure:

  • Inbound rules: Windows Firewall will block all incoming traffic unless solicited or allowed by a rule.
  • Outbound rules: Windows Firewall will allow all outbound traffic unless blocked by a rule.
  • Connection security rules: Windows Firewall uses a connection security rule to force two peer computers to authenticate before they can establish a connection and to secure information transmitted between the two computers. Connection security rules use IPsec to enforce security requirements. Connection security rules will be explained more in the next chapter.
  • Monitoring: Windows Firewall uses the monitoring interface to display information about current firewall rules, connection security rules, and security associations.

Windows Firewall is on by default. When Windows Firewall is on, most programs are blocked from communicating through the firewall. If you want to unblock a program, you can add it to the Exceptions list (on the Exceptions tab). For example, you might not be able to send photos in an instant message until you add the instant messaging program to the Exceptions list. To add a program to the Exceptions list, see Allow a program to communicate through Windows Firewall.

To turn on or off Windows Firewall:

  1. Open Windows Firewall with Advanced Security located in Administrative Tools.
  2. Click the Windows Firewall Properties.
  3. Under Firewall state, Select either On (recommended) or Off (not recommended) and click the OK button. See Figure 5.4.
    Figure 5.4

    Figure 5.4 Windows Firewall properties.

Creating Inbound and Outbound Rules

You create inbound rules to control access to your computer from the network. Inbound rules can prevent

  • Unwanted software being copied to your computer
  • Unknown or unsolicited access to data on your computer
  • Unwanted configuration of your computer from remote locations

To configure advanced properties for a rule using the Windows Firewall with Advanced Security, follow these steps:

  1. Right-click the name of the inbound rule and click Properties.
  2. From the properties dialog box for an inbound rule, configure settings on the following tabs:

    • General: The rule’s name, the program to which the rule applies, and the rule’s action (allow all connections, allow only secure connections, or block).
    • Programs and Services: The programs or services to which the rule applies.
    • Users and Computers: If the rule’s action is to allow only secure connections, the computer accounts that are authorized to make protected connections.
    • Protocols and Ports: The rule’s IP protocol, source and destination TCP or UDP ports, and ICMP or ICMPv6 settings.
    • Scope: The rule’s source and destination addresses.
    • Advanced: The profiles or types of interfaces to which the rule applies.

You can also use the Windows Firewall with Advanced Security to create outbound rules to control access to network resources from your computer. Outbound rules can prevent:

  • Utilities on your computer accessing network resources without your knowledge.
  • Utilities on your computer downloading software without your knowledge.
  • Users of your computer downloading software without your knowledge.

Determining a Firewall Profile

A firewall profile is a way of grouping settings, such as firewall rules and connection security rules that are applied to the computer, depending on where the computer is connected. On computers running this version of Windows, there are three profiles for Windows Firewall with Advanced Security. Only one profile is applied at a time.

The available profiles are

  • Domain: Applied when a computer is connected to a network in which the computer’s domain account resides.
  • Private: Applied when a computer is connected to a network in which the computer’s domain account does not reside, such as a home network. The private settings should be more restrictive than the domain profile settings.
  • Public: Applied when a computer is connected to a domain through a public network, such as those available in airports and coffee shops. The public profile settings should be the most restrictive because the computer is connected to a public network where the security cannot be as tightly controlled as within an IT environment.

Using netsh Command to Configure the Windows Firewall

To view the current firewall configuration, including ports that have been opened, use the following command:

netsh firewall show state

To open ports at the firewall for DNS (port 53), use the following command:

netsh firewall add portopening ALL 53 DNS-server

To view the firewall configuration, use the following command:

netsh firewall show config

To enter the netsh advfirewall context, at the command prompt, type

netsh

When you enter the netsh context, the command prompt displays the >netsh prompt. At the >netsh prompt, enter the advfirewall context type:

advfirewall

After you are in the advfirewall context, you can type commands in that context.

Commands include the following:

  • Export: Exports the current firewall policy to a file.
  • Help: Displays a list of available commands.
  • Import: Imports a policy from the specified file.
  • Reset: Restores Windows Firewall with Advanced Security to the default policy.
  • Set: Supports the following commands:

    • set file: Copies the console output to a file.
    • set machine: Sets the current machine on which to operate.
    • show: Shows the properties for a particular profile. Examples include show allprofiles, show domainprofile, show privateprofile and show publicprofile.

In addition to the commands available for the advfirewall context, advfirewall also supports several subcontexts. To enter a subcontext, type the name of the subcontext at the netsh advfirewall> prompt. The available subcontexts are

  • consec: Enables you to view and configure computer security connection rules
  • Firewall: Enables you to view and configure firewall rules
  • Monitor: Enables you to view and set monitoring configuration

Managing Windows Firewall with Advanced Security via Group Policy

To centralize the configuration of large numbers of computers in an organization network that uses the Active Directory directory service, you can deploy settings for Windows Firewall with Advanced Security through Group Policy. Group Policy provides access to the full feature set of Windows Firewall with Advanced Security, including profile settings, rules, and computer connection security rules.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020