a6-plugin-ip-restriction

Configure APISIX routes with ip-restriction for IP whitelisting or blacklisting.

1|2|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/api7/a6 --skill a6-plugin-ip-restriction-api7
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: a6-plugin-ip-restriction
Source: https://github.com/api7/a6/tree/main/skills/a6-plugin-ip-restriction
Command: npx skills add https://github.com/api7/a6 --skill a6-plugin-ip-restriction-api7

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Configuring the ip-restriction plugin for APISIX via the a6 CLI can be error-prone and manual. This skill automates consistent route-level IP access control with whitelist/blacklist support, CIDR ranges, IPv4/IPv6, and real-IP handling behind proxies.

Core Features & Use Cases

  • IP whitelist/blacklist with CIDR support for both IPv4 and IPv6
  • Real-IP integration to ensure accurate client identification behind proxies
  • Custom error messages and HTTP response codes for denials
  • Safe, guided workflow for route creation and updates using a6

Quick Start

Create a route with ip-restriction that whitelists 203.0.113.0/24 and deploy to enforce access.

Frequently Asked Questions about a6-plugin-ip-restriction

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure IP whitelist and blacklist rules on APISIX routes?

Configuring IP access control on APISIX routes involves using the ip-restriction plugin to define whitelist or blacklist rules with CIDR ranges for IPv4 and IPv6, enforcing precise network-level permissions.

How does APISIX ip-restriction identify client IP addresses behind a proxy?

APISIX ip-restriction identifies client IPs behind proxies by integrating with the real-ip plugin, ensuring accurate client identification and access control validation even when traffic passes through intermediate network layers.

Can I set custom error messages and HTTP response codes for denied APISIX route requests?

Yes, you can set custom error messages and HTTP response codes for denied requests when configuring the APISIX ip-restriction plugin, allowing tailored feedback for unauthorized IP access attempts.

Does the APISIX ip-restriction plugin support both IPv4 and IPv6 CIDR ranges?

Yes, the APISIX ip-restriction plugin supports both IPv4 and IPv6 CIDR ranges, allowing comprehensive network access control configuration for whitelist and blacklist rules across both protocol versions.

Why does my APISIX ip-restriction configuration fail when using whitelist and blacklist together?

APISIX ip-restriction configurations fail when using whitelist and blacklist together because the plugin enforces a mutually exclusive constraint, validating that only one rule type is applied per route.

What is the best way to automate APISIX route creation with IP access control?

Automating APISIX route creation with IP access control is best handled through the a6 CLI, which provides a safe, guided workflow for consistently deploying ip-restriction plugin configurations without manual errors.