Skip to content

Commit 0fa575c

Browse files
authored
Merge pull request #105472 from vhorne/fw-rule-logic
Updates based on GH Issues requests
2 parents cb81aa3 + 1f6e818 commit 0fa575c

File tree

2 files changed

+73
-7
lines changed

2 files changed

+73
-7
lines changed

articles/firewall/firewall-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ There are three types of rule collections:
4949

5050
## Does Azure Firewall support inbound traffic filtering?
5151

52-
Azure Firewall supports inbound and outbound filtering. Inbound protection is typically used for non-HTTP/S protocols. For example RDP, SSH, and FTP protocols. For best inbound HTTP/S protection, use a web application firewall such as [Azure Web Application Firewall on Azure Application Gateway](../web-application-firewall/ag/ag-overview.md).
52+
Azure Firewall supports inbound and outbound filtering. Inbound protection is typically used for non-HTTP/S protocols. For example RDP, SSH, and FTP protocols. For best inbound HTTP/S protection, use a web application firewall such as [Azure Web Application Firewall (WAF)](../web-application-firewall/overview.md).
5353

5454
## Which logging and analytics services are supported by the Azure Firewall?
5555

articles/firewall/rule-processing.md

Lines changed: 72 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,86 @@ services: firewall
55
author: vhorne
66
ms.service: firewall
77
ms.topic: article
8-
ms.date: 11/19/2018
8+
ms.date: 02/25/2020
99
ms.author: victorh
1010
---
1111

1212
# Azure Firewall rule processing logic
13-
Azure Firewall has NAT rules, network rules, and applications rules. The rules are processed according to the rule type.
13+
You can configure NAT rules, network rules, and applications rules on Azure Firewall. The rules are processed according to the rule type.
1414

15+
> [!NOTE]
16+
> If you enable threat intelligence-based filtering, those rules are highest priority and are always processed first. Threat-intelligence filtering may deny traffic before any configured rules are processed. For more information, see [Azure Firewall threat intelligence-based filtering](threat-intel.md).
1517
16-
## Network rules and applications rules
17-
Network rules are applied first, then application rules. The rules are terminating. So if a match is found in network rules, then application rules are not processed. If there is no network rule match, and if the packet protocol is HTTP/HTTPS, the packet is then evaluated by the application rules. If still no match is found, then the packet is evaluated against the infrastructure rule collection. If there is still no match, then the packet is denied by default.
18+
## Outbound
1819

19-
## NAT rules
20-
Inbound connectivity can be enabled by configuring Destination Network Address Translation (DNAT) as described in [Tutorial: Filter inbound traffic with Azure Firewall DNAT using the Azure portal](tutorial-firewall-dnat.md). DNAT rules are applied first. If a match is found, an implicit corresponding network rule to allow the translated traffic is added. You can override this behavior by explicitly adding a network rule collection with deny rules that match the translated traffic. No application rules are applied for these connections.
20+
### Network rules and applications rules
2121

22+
If you configure network rules and application rules, then network rules are applied in priority order before application rules. The rules are terminating. So if a match is found in a network rule, no other rules are processed. If there is no network rule match, and if the protocol is HTTP,HTTPS, or MSSQL, the the packet is then evaluated by the application rules in priority order. If still no match is found, then the packet is evaluated against the [infrastructure rule collection](infrastructure-fqdns.md). If there is still no match, then the packet is denied by default.
23+
24+
## Inbound
25+
26+
### NAT rules
27+
28+
Inbound connectivity can be enabled by configuring Destination Network Address Translation (DNAT) as described in [Tutorial: Filter inbound traffic with Azure Firewall DNAT using the Azure portal](tutorial-firewall-dnat.md). NAT rules are applied in priority before network rules. If a match is found, an implicit corresponding network rule to allow the translated traffic is added. You can override this behavior by explicitly adding a network rule collection with deny rules that match the translated traffic.
29+
30+
Application rules are not applied for inbound connections. So if you want to filter inbound HTTP/S traffic, you should use Web Application Firewall (WAF). For more information, see [What is Azure Web Application Firewall?](../web-application-firewall/overview.md)
31+
32+
## Examples
33+
34+
The following examples show the results of some of these rule combinations.
35+
36+
### Example 1
37+
38+
Connection to google.com is allowed because of a matching network rule.
39+
40+
**Network rule**
41+
42+
- Action: Allow
43+
44+
45+
|name |Protocol |Source type |Source |Destination type |Destination address |Destination ports|
46+
|---------|---------|---------|---------|----------|----------|--------|
47+
|Allow-web |TCP|IP address|*|IP address|*|80,443
48+
49+
**Application rule**
50+
51+
- Action: Deny
52+
53+
|name |Source type |Source |Protocol:Port|Target FQDNs|
54+
|---------|---------|---------|---------|----------|----------|
55+
|Deny-google |IP address|*|http:80,https:443|google.com
56+
57+
**Result**
58+
59+
The connection to google.com is allowed because the packet matches the *Allow-web* network rule. Rule processing stops at this point.
60+
61+
### Example 2
62+
63+
SSH traffic is denied because a higher priority *Deny* network rule collection blocks it.
64+
65+
**Network rule collection 1**
66+
67+
- Name: Allow-collection
68+
- Priority: 200
69+
- Action: Allow
70+
71+
|name |Protocol |Source type |Source |Destination type |Destination address |Destination ports|
72+
|---------|---------|---------|---------|----------|----------|--------|
73+
|Allow-SSH |TCP|IP address|*|IP address|*|22
74+
75+
**Network rule collection 2**
76+
77+
- Name: Deny-collection
78+
- Priority: 100
79+
- Action: Deny
80+
81+
|name |Protocol |Source type |Source |Destination type |Destination address |Destination ports|
82+
|---------|---------|---------|---------|----------|----------|--------|
83+
|Deny-SSH |TCP|IP address|*|IP address|*|22
84+
85+
**Result**
86+
87+
SSH connections are denied because a higher priority network rule collection blocks it. Rule processing stops at this point.
2288

2389
## Next steps
2490

0 commit comments

Comments
 (0)