Lock internal AI endpoints to approved IP and CIDR ranges
Ensure B2B partner integrations and internal admin pipelines only accept traffic from static VPN, VPC NAT, or enterprise IP blocks.
Checklist for clean IP allowlist rules
- 01
Verify static NAT egress first
Confirm your serverless or VPC functions route via static NAT IPs before turning on strict blocks.
- 02
Bind allowlists per key when multi-tenant
Apply IP restrictions per enterprise API key rather than breaking mobile users on shared endpoints.
- 03
Label CIDR entries clearly
Tag every whitelisted range with the office, staging cluster, or partner name for future audits.
- 04
Pair IP checks with secret keys
Treat CIDR rules as an extra network layer alongside bearer tokens—never as standalone auth.
Common questions
Can different B2B customers each set their own allowed IP list?
Yes. Per-key IP allowlists restrict each enterprise key to its own NAT IPs without impacting other tenants.
What happens if an allowed key is leaked and run from a stranger's laptop?
Requests from outside the approved CIDR range are dropped at the edge with HTTP 403 before execution.
Does APIkit support IPv6 CIDR notation?
Yes, both IPv4 and IPv6 addresses and CIDR subnet masks are supported in allowlist configurations.
Related tasks in this category
See all in API Key Auth, Scopes & Quotas-
Issue scoped API keys per customer and environment
Generate prefixed keys restricted to specific endpoints, read-only routes, or workspaces—no custom auth database required.
-
Meter and cap monthly token quotas per tenant
Track exact prompt and completion token usage per workspace, warn at 80%, and enforce clean monthly caps without building Stripe metering pipelines.
-
Rotate API keys smoothly with overlapping grace windows
Issue replacement API keys with a configurable 24-hour or 7-day overlap window so mobile workers and cron jobs migrate without outages.
-
Verify end-user JWT claims directly at your AI endpoint
Let web or mobile apps pass Auth0, Clerk, or Supabase JWTs straight to APIkit—verifying signatures and claims without a proxy server.
-
Configure exact CORS origin policies for browser clients
Allow your production domains and preview deployments to call endpoints cleanly while blocking unauthorized third-party sites.
-
Shield public unauthenticated AI forms from bot abuse
Keep interactive landing-page demos and public lead widgets safe from scripted prompt drain using origin checks, payload caps, and Turnstile tokens.