I want to block certain regions of a country on application gateway and not entire country how can I do that

Kajal Kothari 0 Reputation points
2024-05-14T20:00:33.4566667+00:00

I want to block certain regions in country based on iso code and azure only gives me option to do it for entire country. How can I implement it for a region in country

Azure Web Application Firewall
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 48,111 Reputation points Microsoft Employee
    2024-05-15T05:36:11.3233333+00:00

    Hello @Kajal Kothari ,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    I understand that you would like to know how to block certain regions of a country on your Application gateway and not an entire country.

    Azure Web Application Firewall geomatch custom rules let you match web requests to the geographic location of where they come from. Geomatch custom rules can also help you follow data sovereignty and privacy laws by limiting access to your web applications based on the location of the people using them.

    But the countries/regions available to select in the WAF rules are provided as Two-letter country or region codes which maps to a country or region in the below list.

    https://learn.microsoft.com/en-us/azure/web-application-firewall/ag/geomatch-custom-rules#countryregion-codes

    When creating a geomatch rule, the selectors can be any of the two-digit country/region codes provided in the above list but cannot be broken down further.

    You can refer to the examples of geomatch rule usage in the below document:

    https://learn.microsoft.com/en-us/azure/web-application-firewall/geomatch-custom-rules-examples

    May I know what exactly you are trying to achieve with your WAF?

    Kindly let us know if the above helps or you need further assistance on this issue.


    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments