How to apply geo-filtering to a livestream in Azure Media Services using CDN Profile?

Jason Maglaya 1 Reputation point
2021-01-18T04:04:32.867+00:00

Hello everyone,

I'm pretty new to Microsoft Azure and it is my first time to use Media Services. I managed to put up a livestream and the streaming is totally fine, but I can't get the geo-filtering to work. What I did is:

  1. Created a Premium Premium Verizon CDN Profile.
  2. Created a streaming endpoint in the Media Services account, enabled CDN, and set to use the previously created Verizon CDN Profile.
  3. Started the livestream.
  4. Went to Verizon CDN Profile, opened the endpoint and configured to block India. Path is root (/).
  5. Waited at least 2 hours to let the CDN to propagate.
  6. Asked my buddy in India to open the livestream, but my buddy can still play the livestream.

I also tried to use Premium and Standard Akamai but still no luck.

Any help will be appreciated. Thank you in advance.

Azure Media Services
Azure Media Services
A group of Azure services that includes encoding, format conversion, on-demand streaming, content protection, and live streaming services.
313 questions
Azure Content Delivery Network
{count} votes

2 answers

Sort by: Most helpful
  1. SUNOJ KUMAR YELURU 14,016 Reputation points MVP
    2021-01-18T06:38:50.193+00:00

    Hi @Jason Maglaya

    Thank you for posting in Q & A.

    To access the geo-filtering feature, select your CDN endpoint within the portal, then select Geo-filtering under SETTINGS in the left-hand menu.

    Please don’t forget to Accept the answer and up-vote wherever the information provided helps you, this can be beneficial to other community members.


  2. SnehaAgrawal-MSFT 19,921 Reputation points
    2021-01-18T12:17:21.46+00:00

    Thanks for asking question! If understood right you want to Restrict Azure CDN content by country/region for Azure CDN Premium from Verizon profiles. If so, you may follow these Step for creating a geo-filtering rule.

    1. From the top menu in your Azure CDN profile, select Manage.
    2. From the Verizon portal, select HTTP Large, then select Country Filtering.
    3. Select Add Country Filter.
    4. In Step One:, enter the directory path. Select Block or Add, then select Next. Please note that The endpoint name must be in the path. Example: /myendpoint8675/myfolder. Replace myendpoint8675 with the
      name of your endpoint.
      1. In Step Two, select one or more countries/regions from the list. Select Finish to activate the rule.

    Also there are some Considerations:

    • For Azure CDN Premium from Verizon profiles, propagation usually completes in 10 minutes.
    • This feature doesn't support wildcard characters (for example, *).
    • The geo-filtering configuration associated with the relative path is applied recursively to that path.
    • Only one rule can be applied to the same relative path. That is, you can't create multiple country/region filters that point to the same
      relative path. However, because country/region filters are recursive, a folder can have multiple country/region filters.
      In other words, a subfolder of a previously configured folder can be assigned a different country/region filter.
    • The geo-filtering feature uses country codes to define the countries/regions from which a request is allowed or blocked for a secured
      directory. Although Akamai and Verizon profiles support most of the same country codes, there are a few differences. For more
      information, see Azure CDN country codes.

    You may refer to this official document link might be helpful: https://video2.skills-academy.com/en-us/azure/cdn/cdn-restrict-access-by-country

    hope this helps, let us know incase issue persists.

    0 comments No comments