Windows 7 / Networking

Filtering Conditions FOR Firewall RULES

Firewall rules can filter traffic based on a number of different conditions (see Table below). The effect of a rule is the logical AND of all these different conditions.

Filtering Conditions for Firewall Rules

ConditionPossible Value
ProtocolAny Custom (Internet Assigned Numbers Authority [IANA] IP protocol number)
TCP or UDP
ICMPv4 or ICMPv6
Other protocols, including Internet Group Management Protocol [IGMP], HOPOPT, Generic Route Encapsulation [GRE], IPv6-NoNxt, IPv6-Opts, Virtual Router Redundancy Protocol [VRRP], Pragmatic General Multicast [PGM], Layer 2 Tunneling Protocol [L2TP], IPv6-Route, IPv6-Frag
Local Port (inbound TCP only)All ports
Specific ports
RPC dynamic ports
RPC end-point mapper
IP over Hypertext Transfer Protocol Secure (HTTPS)
(IP-HTTPS)
Local Port (inbound UDP only)All ports
Specific ports
Edge traversal
Local port (outbound TCP only)All ports
Specific ports
Local port (outbound UDP only)All ports
Specific ports
Remote port (inbound TCP only)All ports
Specific ports
Remote port (inbound UDP only)All ports
Specific ports
Remote port (outbound TCP only)All ports
Specific ports
IP-HTTPS
Remote port (outbound UDP only)All ports
Specific ports
ICMP Type Code (for ICMPv4 and ICMPv6)All ICMP Types
Specific types of ICMP traffic
Local IP address scope*A specific IPv4 or IPv6 address or list of addresses
A range of IPv4 or IPv6 addresses or list of ranges
An entire IPv4 or IPv6 subnet or list of subnets
Remote IP address scope*A specific IPv4 or IPv6 address or list of addresses
A range of IPv4 or IPv6 addresses or list of ranges
An entire IPv4 or IPv6 subnet or list of subnets
A predefined set of computers-including local subnet, default gateway, DNS servers, WINS servers, or DHCP servers-or a list of such items
ProfilesSpecify the profile(s) to which the rule applies; for example, Domain, Private, and/or Public
Interface typeAll interface types
Local area network
Remote access
Wireless
Edge traversalAllow edge traversal
Block edge traversal
Defer to user
Defer to application
ProgramsAll programs
System, a special keyword that if used will restrict traffic to the System Process (useful for scoping traffic to any Kernel Mode driver such as Http.sys, Smb.sys, and so on)
Specify path and .exe name to program executable (path can include environment variables)
Services**Apply to all programs and services Apply to services only
Apply to a specified service or to a service with the specified short name
UserOnly allows connections from the specified users or groups of users (optionally with specified exceptions); this filtering condition can only be used when Allow This Connection If It Is Secure has been selected on the General tab of the rule's properties
ComputerOnly allows connections from the specified computers or groups of computers (optionally with specified exceptions); this filtering condition can only be used when Allow This Connection If It Is Secure has been selected on the General tab of the rule's properties

*When creating and configuring firewall rules, use the scope filtering condition wherever possible. For example, if you do network backup and need to allow incoming connections from the backup service, configure the scope so that Windows Firewall allows connections only from the backup server's IP address or network. Similarly, refine the scope for network management and remote administration tools to just those networks that require it.

**Firewall rules can allow or block services regardless of where their executables are located on the computer. Services can be specified by their service name, even if the service is implemented as a dynamic-link library (DLL). Programs are identified by specifying the application path. (Specifying DLLs is not supported.) In addition, the service needs to have an associated service SID for this scoping to work correctly. To verify this, use the sc qsidtype serviceshortname command to verify that the service SID is not set to NONE.

[Previous] [Contents] [Next]

In this tutorial:

  1. Configuring Windows Firewall and IPsec
  2. Understanding Windows Firewall with Advanced Security
  3. Improvements to Windows Firewall Introduced Previously in Windows Vista
  4. Additional Improvements to Windows Firewall in Windows 7
  5. Understanding the Windows Filtering Platform
  6. Windows Firewall and the Startup Process
  7. Understanding Windows Service Hardening
  8. Understanding Service SIDs
  9. Windows Firewall and WSH
  10. Windows Firewall and Service Triggers
  11. Understanding Multiple Active Firewall Profiles
  12. Understanding Rules
  13. Understanding Firewall Rules
  14. Inbound vs . Outbound Rules
  15. Allow vs . Block Rules
  16. Allow If Secure Rules
  17. Authenticated Bypass Rules
  18. Filtering Conditions FOR Firewall RULES
  19. Understanding Connection Security Rules
  20. Types of Connection Security Rules
  21. Supported IPsec Settings for Connection Security Rules
  22. Default IPsec Settings for Connection Security Rules
  23. Windows Firewall and Windows PE
  24. Understanding Default Rules
  25. Understanding WSH Rules
  26. Understanding Rules Processing
  27. Managing Windows Firewall with Advanced Security
  28. Tools for Managing Windows Firewall with Advanced Security
  29. Managing Windows Firewall Using Control Panel
  30. Managing Windows Firewall Using the Windows Firewall with Advanced Security Snap-in
  31. Managing Windows Firewall Using Group Policy
  32. Considerations When Managing Windows Firewall Using Group Policy
  33. Managing Windows Firewall Using the Netsh Command
  34. Common Management Tasks
  35. Enabling or Disabling Windows Firewall
  36. Configuring Firewall Profiles and IPsec Settings by Using Group Policy
  37. Creating and Configuring Firewall Rules
  38. Creating and Configuring Connection Security Rules
  39. Monitoring Windows Firewall
  40. Troubleshooting Windows Firewall
  41. Troubleshooting Windows Firewall Using Firewall Logs
  42. Troubleshooting Windows Firewall Using Event Logs
  43. Troubleshooting Windows Firewall Using Auditing
  44. Troubleshooting IPsec Issues Using Netsh Wfp
  45. Troubleshooting Windows Filtering Platform and IPsec Issues Using Netsh Trace