Unify Logo Footer.svg
API Manager
Logo
IP Based Access Control Policy

IP Based Access Control Policy

Logo

3 mins READ

Allow or deny API access based on the client's IP address using configurable allow lists and block lists.

Overview

An IP Based Access Control Policy restricts or allows access to APIs based on the client's IP address. Define an allow list of trusted IPs, a block list of denied IPs, or both — requests are evaluated against these lists at the gateway before reaching the backend, blocking unauthorized or suspicious sources without any changes to the backend service.

ip_based.png
ip_based.png

Field Reference

Field

Description

Policy Name *

A unique identifier used across logs, dashboards, and API group configurations.

Tags

Custom labels to organize and filter the policy by environment, team, or functionality.

Allow List

IP addresses or ranges that are permitted to access the API. Separate multiple entries with commas. If configured, any IP not on the list is denied.

Block List

IP addresses or ranges that are explicitly denied access. Separate multiple entries with commas. Block list is evaluated before the allow list.

ip_based-1.png
ip_based-1.png

How It Works

  1. Request received — The gateway receives the API request and identifies the client's IP address.

  2. Block list check — The IP is checked against the block list. If it matches, the request is immediately rejected.

  3. Allow list check — If an allow list is configured, the IP is validated against it. If the IP is not on the list, the request is rejected. If no allow list is defined, all non-blocked IPs are allowed.

  4. Request forwarded — If the IP passes all checks, the request proceeds to the backend.

  5. Access enforcement — Rejected requests receive an error response indicating access is denied.

Attaching to an API Group

Once an IP Based Access Control Policy is created, attach it to one or more API Groups from the group's policy settings. Multiple policies can be applied to a single group; drag them into the desired execution order.

Notes

  • The block list is evaluated before the allow list — if an IP appears in both, it is blocked.

  • IP ranges can be expressed in CIDR notation (e.g., 192.168.1.0/24) to allow or block entire subnets.

  • If you configure only an allow list (no block list), any IP not explicitly listed is denied — use this for tightly controlled internal APIs.

  • Be careful when blocking dynamic or NAT IP ranges — legitimate clients behind shared NAT may be affected. Prefer allow-listing internal IP ranges when possible.

FAQs

What happens if an IP is on both the allow list and the block list?

The block list is evaluated first. If an IP matches the block list, the request is denied regardless of whether the IP also appears on the allow list.

Can I use CIDR ranges in the allow and block lists?

You can specify individual IP addresses or CIDR ranges (e.g., 10.0.0.0/8) to cover entire subnets. Separate multiple entries with commas.

If I configure only a block list with no allow list, what happens to unlisted IPs?

Unlisted IPs are allowed through. Only IPs explicitly on the block list are denied. To restrict access to specific IPs only, configure an allow list instead.

Does this policy work for IPv6 addresses?

The policy evaluates the IP address the gateway receives from the request. Whether IPv6 is supported depends on the gateway's network configuration — check with your platform administrator if your clients use IPv6.