Search code examples
policyazure-api-management

Azure API Management Restrict multiple caller IP Address


If I look at the below URl for restricting IP Address in API Management with its policy "IP-Filter", we can either limit single IP Address or a range. Is there a way I can filter different IP Address like 172.2.2.2, 122.2.2.4, 134.2.2.3?

https://learn.microsoft.com/en-us/azure/api-management/api-management-access-restriction-policies#RestrictCallerIPs

Thanks and Regards, Manu


Solution

  • Graphical interface allows you to add many IP addresses in "Filter IP addresses" policy.

    enter image description here

    It's changed to the following xml expression

        <ip-filter action="allow">
            <address>10.10.1.1</address>
            <address>10.10.1.200</address>
        </ip-filter>