You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -17,7 +17,7 @@ Custom rules allow you to create your own rules that are evaluated for each requ
17
17
18
18
For example, you can block all requests from an IP address in the range 192.168.5.4/24. In this rule, the operator is *IPMatch*, the matchValues is the IP address range (192.168.5.4/24), and the action is to block the traffic. You also set the rule’s name and priority.
19
19
20
-
Custom rules support using compounding logic to make more advanced rules that address your security needs. For example, (Condition 1 **and** Condition 2) **or** Condition 3). This example means that if Condition 1 **and** Condition 2 are met, **or** if Condition 3 is met, the WAF should take the action specified in the custom rule.
20
+
Custom rules support using compounding logic to make more advanced rules that address your security needs. For example, (Condition 1 **and** Condition 2) **or** Condition 3). This means that if Condition 1 **and** Condition 2 are met, **or** if Condition 3 is met, the WAF should take the action specified in the custom rule.
21
21
22
22
Different matching conditions within the same rule are always compounded using **and**. For example, block traffic from a specific IP address, and only if they’re using a certain browser.
23
23
@@ -26,7 +26,7 @@ If you want to **or** two different conditions, the two conditions must be in di
26
26
> [!NOTE]
27
27
> The maximum number of WAF custom rules is 100. For more information about Application Gateway limits, see [Azure subscription and service limits, quotas, and constraints](../../azure-resource-manager/management/azure-subscription-service-limits.md#application-gateway-limits).
28
28
29
-
Regular expressions are also supported in custom rules, just like in the CRS rulesets. For examples of these, see Examples 3 and 5 in [Create and use custom web application firewall rules](create-custom-waf-rules.md).
29
+
Regular expressions are also supported in custom rules, just like in the CRS rulesets. For examples, see Examples 3 and 5 in [Create and use custom web application firewall rules](create-custom-waf-rules.md).
30
30
31
31
## Allowing vs. blocking
32
32
@@ -87,7 +87,7 @@ This custom rule contains a name, priority, an action, and the array of matching
87
87
88
88
### Name [optional]
89
89
90
-
This is the name of the rule. This name appears in the logs.
90
+
The name of the rule. It appears in the logs.
91
91
92
92
### Priority [required]
93
93
@@ -152,198 +152,13 @@ List of values to match against, which can be thought of as being *OR*'ed. For e
152
152
153
153
### Action [required]
154
154
155
-
- Allow – Authorizes the transaction, skipping all subsequent rules. This means that the specified request is added to the allow list and once matched, the request stops further evaluation and is sent to the backend pool. Rules that are on the allow list aren't evaluated for any further custom rules or managed rules.
156
-
- Block – Blocks the transaction based on *SecDefaultAction* (detection/prevention mode). Just like the Allow action, once the request is evaluated and added to the block list, evaluation is stopped and the request is blocked. Any request after that meets the same conditions will not be evaluated and will just be blocked.
157
-
- Log – Lets the rule write to the log, but lets the rest of the rules run for evaluation. Subsequent custom rules are evaluated in order of priority, followed by the managed rules.
155
+
- Allow – Authorizes the transaction, skipping all other rules. The specified request is added to the allow list and once matched, the request stops further evaluation and is sent to the backend pool. Rules that are on the allow list aren't evaluated for any further custom rules or managed rules.
156
+
- Block – Blocks the transaction based on *SecDefaultAction* (detection/prevention mode). Just like the Allow action, once the request is evaluated and added to the block list, evaluation is stopped and the request is blocked. Any request after that meets the same conditions won't be evaluated and will just be blocked.
157
+
- Log – Lets the rule write to the log, but lets the rest of the rules run for evaluation. The other custom rules are evaluated in order of priority, followed by the managed rules.
158
158
159
159
## Geomatch custom rules (preview)
160
160
161
-
Custom rules allow for the creation of tailored rules to suit the exact needs of your applications, and your security policies. Now, you are able restrict access to your web applications by country/region, which is available in public preview. As with all custom rules, this logic can be compounded with other rules to suit the needs of your application.
162
-
163
-
> [!NOTE]
164
-
> Geomatch custom rules are available in South Central US and North Europe. To access them in the portal, please use [this link](https://aka.ms/AppGWWAFGeoMatch) until it goes live for everyone.
165
-
166
-
If you are using the Geomatch operator, the selectors can be any of the following two-digit country codes.
167
-
168
-
|Country code | Country name |
169
-
| ----- | ----- |
170
-
| AD | Andorra |
171
-
| AE | United Arab Emirates|
172
-
| AF | Afghanistan|
173
-
| AG | Antigua and Barbuda|
174
-
| AL | Albania|
175
-
| AM | Armenia|
176
-
| AO | Angola|
177
-
| AR | Argentina|
178
-
| AS | American Samoa|
179
-
| AT | Austria|
180
-
| AU | Australia|
181
-
| AZ | Azerbaijan|
182
-
| BA | Bosnia and Herzegovina|
183
-
| BB | Barbados|
184
-
| BD | Bangladesh|
185
-
| BE | Belgium|
186
-
| BF | Burkina Faso|
187
-
| BG | Bulgaria|
188
-
| BH | Bahrain|
189
-
| BI | Burundi|
190
-
| BJ | Benin|
191
-
| BL | Saint Barthélemy|
192
-
| BN | Brunei Darussalam|
193
-
| BO | Bolivia|
194
-
| BR | Brazil|
195
-
| BS | Bahamas|
196
-
| BT | Bhutan|
197
-
| BW | Botswana|
198
-
| BY | Belarus|
199
-
| BZ | Belize|
200
-
| CA | Canada|
201
-
| CD | Democratic Republic of the Congo|
202
-
| CF | Central African Republic|
203
-
| CH | Switzerland|
204
-
| CI | Cote d'Ivoire|
205
-
| CL | Chile|
206
-
| CM | Cameroon|
207
-
| CN | China|
208
-
| CO | Colombia|
209
-
| CR | Costa Rica|
210
-
| CU | Cuba|
211
-
| CV | Cabo Verde|
212
-
| CY | Cyprus|
213
-
| CZ | Czech Republic|
214
-
| DE | Germany|
215
-
| DK | Denmark|
216
-
| DO | Dominican Republic|
217
-
| DZ | Algeria|
218
-
| EC | Ecuador|
219
-
| EE | Estonia|
220
-
| EG | Egypt|
221
-
| ES | Spain|
222
-
| ET | Ethiopia|
223
-
| FI | Finland|
224
-
| FJ | Fiji|
225
-
| FM | Micronesia, Federated States of|
226
-
| FR | France|
227
-
| GB | United Kingdom|
228
-
| GE | Georgia|
229
-
| GF | French Guiana|
230
-
| GH | Ghana|
231
-
| GN | Guinea|
232
-
| GP | Guadeloupe|
233
-
| GR | Greece|
234
-
| GT | Guatemala|
235
-
| GY | Guyana|
236
-
| HK | Hong Kong SAR|
237
-
| HN | Honduras|
238
-
| HR | Croatia|
239
-
| HT | Haiti|
240
-
| HU | Hungary|
241
-
| ID | Indonesia|
242
-
| IE | Ireland|
243
-
| IL | Israel|
244
-
| IN | India|
245
-
| IQ | Iraq|
246
-
| IR | Iran, Islamic Republic of|
247
-
| IS | Iceland|
248
-
| IT | Italy|
249
-
| JM | Jamaica|
250
-
| JO | Jordan|
251
-
| JP | Japan|
252
-
| KE | Kenya|
253
-
| KG | Kyrgyzstan|
254
-
| KH | Cambodia|
255
-
| KI | Kiribati|
256
-
| KN | Saint Kitts and Nevis|
257
-
| KP | Korea, Democratic People's Republic of|
258
-
| KR | Korea, Republic of|
259
-
| KW | Kuwait|
260
-
| KY | Cayman Islands|
261
-
| KZ | Kazakhstan|
262
-
| LA | Lao People's Democratic Republic|
263
-
| LB | Lebanon|
264
-
| LI | Liechtenstein|
265
-
| LK | Sri Lanka|
266
-
| LR | Liberia|
267
-
| LS | Lesotho|
268
-
| LT | Lithuania|
269
-
| LU | Luxembourg|
270
-
| LV | Latvia|
271
-
| LY | Libya |
272
-
| MA | Morocco|
273
-
| MD | Moldova, Republic of|
274
-
| MG | Madagascar|
275
-
| MK | North Macedonia|
276
-
| ML | Mali|
277
-
| MM | Myanmar|
278
-
| MN | Mongolia|
279
-
| MO | Macao SAR|
280
-
| MQ | Martinique|
281
-
| MR | Mauritania|
282
-
| MT | Malta|
283
-
| MV | Maldives|
284
-
| MW | Malawi|
285
-
| MX | Mexico|
286
-
| MY | Malaysia|
287
-
| MZ | Mozambique|
288
-
| NA | Namibia|
289
-
| NE | Niger|
290
-
| NG | Nigeria|
291
-
| NI | Nicaragua|
292
-
| NL | Netherlands|
293
-
| NO | Norway|
294
-
| NP | Nepal|
295
-
| NR | Nauru|
296
-
| NZ | New Zealand|
297
-
| OM | Oman|
298
-
| PA | Panama|
299
-
| PE | Peru|
300
-
| PH | Philippines|
301
-
| PK | Pakistan|
302
-
| PL | Poland|
303
-
| PR | Puerto Rico|
304
-
| PT | Portugal|
305
-
| PW | Palau|
306
-
| PY | Paraguay|
307
-
| QA | Qatar|
308
-
| RE | Reunion|
309
-
| RO | Romania|
310
-
| RS | Serbia|
311
-
| RU | Russian Federation|
312
-
| RW | Rwanda|
313
-
| SA | Saudi Arabia|
314
-
| SD | Sudan|
315
-
| SE | Sweden|
316
-
| SG | Singapore|
317
-
| SI | Slovenia|
318
-
| SK | Slovakia|
319
-
| SN | Senegal|
320
-
| SO | Somalia|
321
-
| SR | Suriname|
322
-
| SS | South Sedan|
323
-
| SV | El Salvador|
324
-
| SY | Syrian Arab Republic|
325
-
| SZ | Swaziland|
326
-
| TC | Turks and Caicos Islands|
327
-
| TG | Togo|
328
-
| TH | Thailand|
329
-
| TN | Tunisia|
330
-
| TR | Turkey|
331
-
| TT | Trinidad and Tobago|
332
-
| TW | Taiwan|
333
-
| TZ | Tanzania, United Republic of|
334
-
| UA | Ukraine|
335
-
| UG | Uganda|
336
-
| US | United States|
337
-
| UY | Uruguay|
338
-
| UZ | Uzbekistan|
339
-
| VC | Saint Vincent and the Grenadines|
340
-
| VE | Venezuela|
341
-
| VG | Virgin Islands, British|
342
-
| VI | Virgin Islands, U.S.|
343
-
| VN | Vietnam|
344
-
| ZA | South Africa|
345
-
| ZM | Zambia|
346
-
| ZW | Zimbabwe|
161
+
Custom rules let you create tailored rules to suit the exact needs of your applications and security policies. You can restrict access to your web applications by country/region. For more information, see [Geomatch custom rules (preview)](geomatch-custom-rules.md).
0 commit comments