Delen via


Firewall Rule Wizard: Protocol and Ports Page - Port Rule Type

Applies To: Windows Server 2008 R2

Use this wizard page to specify which protocol and which port or ports specified in a network packet match this firewall rule. Only network traffic that matches the criteria on this page matches the rule and is subject to its action setting.

To get to this wizard page

  1. In the Windows Firewall with Advanced Security MMC snap-in, right-click either Inbound Rules or Outbound Rules , and then click New Rule.

  2. On the Rule Type page, select Port.

  3. Click Next through the wizard until you reach the Protocol and Ports page.

Does this rule apply to TCP or UDP?

Select the protocol whose network traffic you want to filter with this firewall rule. If you need to filter based on a protocol other than TCP or UDP, then you must use the Custom rule type on the Rule Type page.

Inbound rules: Does this rule apply to all local ports or specific local ports?

All local ports

Use this option to apply the rule to inbound network traffic that matches any local port number.

Specific local ports

Use this option to apply the rule only to inbound network traffic that matches a local port number listed in the text box. You can specify multiple port numbers, separated by commas. You can also include a range of port numbers by separating the low and high values with a hyphen.

Outbound rules: Does this rule apply to all remote ports or specific remote ports?

All remote ports

Use this option to apply the rule to outbound network traffic that matches any destination port number.

Specific remote ports

Use this option to apply the rule only to network traffic that matches a destination port number listed in the text box. You can specify multiple port numbers, separated by commas. You can also include a range of port numbers by separating the low and high values with a hyphen.

How to change these settings

After you create the firewall rule, you can change these settings in the Firewall Rule Properties dialog box. This dialog box appears when you double-click a rule in Inbound Rules and Outbound Rules. To change the protocols and port numbers for this rule, select the Protocols and Ports tab.

Additional references