All Products
Search
Document Center

API Gateway:Configure gateway IP blacklists and whitelists

Last Updated:Jun 17, 2026

AI Gateway allows you to configure IP blacklists and whitelists to deny or allow access requests from specific IP addresses. You can apply these policies at the global, domain, or route level for fine-grained access control.

Procedure

  1. Log on to the AI Gateway console.

  2. In the navigation pane on the left, choose Instance. In the top menu bar, select a region.

  3. On the Instance page, click the target instance ID.

  4. In the left-side navigation pane, click Security Management > Blacklist/Whitelist.

  5. In the upper-left corner of the page, click Create. On the Create page, configure the parameters and click Save.

    Parameter

    Description

    Enable

    Enables or disables the blacklist or whitelist policy.

    Name

    The custom name of the IP access control policy.

    Remarks

    An optional remark for the IP access control policy.

    Type

    The type of IP access control policy.

    • Whitelist (Allows Access from Specific IP Addresses): Allows access only from trusted source IP addresses.

    • Blacklist (Denies Access from Specific IP Addresses): Denies access from the specified source IP addresses.

    Effective Level

    The network layer where the policy is enforced. The following options are available: Application Layer (HTTP/HTTPS) and Transport Layer (TCP/UDP).

    • Application Layer (HTTP/HTTPS): This is the default level. The gateway allows a client to establish a connection and then evaluates the request's IP address to determine whether to allow or block the traffic.

    • Transport Layer (TCP/UDP): The gateway inspects the client's IP address during the TCP connection establishment phase. It directly rejects connection requests from unauthorized IP addresses and does not proceed with application-layer processing.

    Granularity

    The scope at which the IP access control policy takes effect.

    • Global: Applies to the entire gateway instance.

    • Domain Name: Applies to a specific domain name.

      Note

      For whitelists, the effective scope is the intersection of the whitelist configurations.

      For blacklists, the effective scope is the union of the blacklist configurations.

    IP Address/CIDR Block

    The source IP addresses or CIDR blocks for the access control policy.