Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 3.26 KB

ip-filter-policy.md

File metadata and controls

69 lines (47 loc) · 3.26 KB
titledescriptionservicesauthorms.servicems.topicms.datems.author
Azure API Management policy reference - ip-filter | Microsoft Docs
Reference for the ip-filter policy available for use in Azure API Management. Provides policy usage, settings, and examples.
api-management
dlepow
azure-api-management
reference
07/23/2024
danlep

Restrict caller IPs

[!INCLUDE api-management-availability-all-tiers]

The ip-filter policy filters (allows/denies) calls from specific IP addresses and/or address ranges.

[!INCLUDE api-management-policy-form-alert]

Policy statement

<ip-filteraction="allow | forbid"> <address>address</address> <address-rangefrom="address"to="address" /> </ip-filter>

Attributes

AttributeDescriptionRequiredDefault
actionSpecifies whether calls should be allowed (allow) or not (forbid) for the specified IP addresses and ranges. Policy expressions are allowed.YesN/A

Elements

ElementDescriptionRequired
addressAdd one or more of these elements to specify a single IP address on which to filter. Policy expressions are allowed.At least one address or address-range element is required.
address-rangeAdd one or more of these elements to specify a range of IP addresses from "address" to "address" on which to filter.At least one address or address-range element is required.

Usage

Usage notes

If you configure this policy at more than one scope, IP filtering is applied in the order of policy evaluation in your policy definition.

Example

In the following example, the policy only allows requests coming either from the single IP address or range of IP addresses specified.

<ip-filteraction="allow"> <address>13.66.201.169</address> <address-rangefrom="13.66.140.128"to="13.66.140.143" /> </ip-filter>

Related policies

[!INCLUDE api-management-policy-ref-next-steps]

close