A static IP proxy can give an API client a predictable source address for allowlisting, but treat that address as managed infrastructure rather than a permanent identity. Confirm the observed egress from the real client, add the smallest necessary IPv4 or IPv6 host prefix to the API policy, keep application and proxy authentication enabled, document change control, and pre-authorize a tested failover path before production traffic depends on it.
Scope: this guide covers public API source-IP allowlisting with stable proxy egress, authentication layers, address-family gaps, maintenance, failover, and verification. It does not replace API credentials, design private VPC connectivity, authorize access to a third-party service, or promise that any address can remain unchanged forever. The Proxy Basics hub explains the adjacent network concepts.
Define stable egress as an operational contract
Stable egress means that traffic sent through an assigned endpoint is expected to leave from a known public address or controlled set of addresses during the agreed service period. It does not mean the address exists outside maintenance, routing, abuse-response, capacity, or provider-change processes. Ask what event can change the exit, how much notice is provided, and who confirms the replacement.
Document the proxy endpoint separately from the observed exit address. A hostname and port tell the client where to connect; the destination sees an egress address after the provider’s routing. One endpoint may map to one exit, a failover pair, or a controlled pool. Verify the actual contract instead of inferring it from product wording.
A useful inventory contains a non-secret route label, endpoint region, address family, expected public CIDR, owning team, business purpose, API environments, authentication method, provider contact, review date, and last successful check. Do not put passwords or complete credential-bearing URIs in that record.
Understand source IP allowlisting at the API boundary
The AWS API Gateway resource-policy guide shows that a resource policy can control invocation using specified source address ranges or CIDR blocks, alongside identity and network conditions. This is one concrete implementation; other gateways use different syntax and evaluation rules. Read the documentation for the actual destination.
Allowlist the smallest routable prefix the operator can maintain. For one assigned IPv4 address, that is normally a host prefix rather than a provider-wide range. Avoid copying a broad subnet merely because it is easier. Every extra address expands who may pass the network condition, even though application authentication should still reject unauthorized callers.
The AWS resource-policy examples demonstrate source-IP conditions and also warn that IPv6 address ranges need policy attention when clients begin using dual-stack endpoints. Copying an example without adapting action, resource, effect, address family, and authorization workflow can lock out the intended client or admit unintended traffic.
Keep the authentication boundary layered
Source IP allowlisting answers where a request appeared to originate. It does not identify a human, service account, tenant, or individual request. Systems behind the same egress can share that source, and a configuration mistake can route an unintended client through it. Continue to require the destination’s API key, OAuth token, signed request, mTLS identity, or other supported application control.
Proxy authentication is a separate boundary. Username/password or source-IP authentication determines whether the client may use the proxy service. Destination authentication determines whether the resulting request may invoke the API. Keep those secrets and rotations independent. The proxy authentication guide compares the two common gateway access models.
Apply least privilege at all layers: one service identity with only required API actions, one proxy assignment for the workload, one narrowly scoped allowlist entry, and a short secret rotation schedule appropriate to the risk. Preserve TLS validation through the tunnel. A source condition is not a reason to send destination credentials over an untrusted or unverified channel.
Use documentation addresses in designs and tests
The IANA IPv4 special-purpose registry identifies TEST-NET blocks such as 192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24 as documentation space that is not globally reachable. Use addresses from those ranges in diagrams, examples, tickets, and policy templates so a copied example cannot target an unrelated public system.
{
"change": "example only - not deployable",
"primaryEgress": "192.0.2.10/32",
"standbyEgress": "198.51.100.20/32",
"environment": "documentation"
}
Replace documentation values only inside the controlled change process and obtain the production addresses from the provider’s verified channel. Validate CIDR syntax and reject private, loopback, link-local, documentation, benchmarking, multicast, and other special-purpose ranges when a policy expects globally routed public egress.
Close IPv4 and IPv6 policy gaps
IPv4 and IPv6 are separate address families. A client that can reach a dual-stack API may select IPv6 even when the operator only documented an IPv4 egress. If the proxy route supports one family but direct networking supports the other, a request can fail closed, bypass intended routing, or present an address missing from the allowlist.
Record the proxy’s inbound and outbound family support, the destination’s DNS answers, and the application’s resolution behavior. If production policy is IPv4-only, enforce and test that route rather than assuming it. If dual-stack is required, obtain the expected IPv6 prefix, add an equivalently narrow rule, and verify both families from the actual client.
Review firewall, API gateway, log parser, monitoring, and ticket tooling for IPv6 support. A policy can be correct while monitoring truncates or normalizes the address incorrectly. Never translate a broad IPv6 prefix into an IPv4-like assumption. The IPv4 and IPv6 proxy guide covers address-family tradeoffs in more detail.
Treat address changes as coordinated releases
Assign an owner on both sides: the team controlling proxy egress and the team controlling the API policy. Record the current and proposed CIDRs, affected clients, maintenance window, validation endpoint, rollback condition, and approval. Do not remove the old entry until the new route has been verified and monitoring shows the expected client moved.
A safe migration usually overlaps old and new narrow entries for a bounded window. Add the replacement, test from the real workload, switch routing, confirm application requests, then remove the old entry. Set an explicit expiry for overlap so a temporary exception does not become permanent. Capture before and after policy hashes when the platform supports reproducible exports.
Monitor provider notices and periodically compare the expected address with controlled observations. Alert on an unexpected source before it becomes a prolonged outage. Avoid polling public echo services at high frequency; one owned or approved endpoint and destination-side access logs provide stronger evidence.
Design failover without pretending one IP is immortal
Failover is not automatic merely because a second proxy exists. The standby needs an assigned address, appropriate region and protocol, valid proxy authentication, API allowlist entry, health check, client selection rule, and documented return path. If any element is missing, the backup is inventory rather than a recovery capability.
Choose between manual and automatic failover based on the workload. Manual change provides deliberate control and is suitable when interruption is tolerable. Automatic selection reduces recovery time but needs hysteresis, bounded attempts, health evidence, and protection against flapping. Never fall back directly to the internet when the proxy is a required security or allowlist boundary.
Test the standby at low volume before an incident and on a schedule that respects the destination. Confirm the API sees the standby source, credentials remain valid, session behavior is acceptable, and monitoring labels it correctly. Record recovery time and the exact condition that returns traffic to the primary.
Exercise ownership transfer as well as technical recovery. When a team, account, provider contract, or API administrator changes, revalidate the recorded assignment and revoke obsolete access. Keep an emergency contact and escalation path outside the failing system. During an incident, do not widen the allowlist to a provider range as a shortcut; use the pre-approved standby or pause the workload. After recovery, compare destination logs with the change record, remove expired overlap, rotate any secret exposed during diagnostics, and capture the lesson in the next test. A quarterly review should confirm that every entry still maps to an active service, named owner, approved purpose, monitored route, and tested removal procedure.
Before choosing backup exits, use the subnet diversity guide to examine shared networks and failure domains. Different address prefixes alone do not prove that the routes fail independently, and each backup still needs destination allowlist approval.
Verify from the real client and destination
- Record the client runtime, proxy route label, address family, and expected primary CIDR without secrets.
- Use an endpoint you own or are authorized to call that reports the source address it observes.
- Send one bounded request through the primary proxy from the production execution context.
- Confirm the observed address equals the expected assignment and TLS remains valid.
- Invoke a read-only API operation using normal destination authentication.
- Correlate the client result with destination-side access or policy logs.
- Repeat through the pre-authorized standby route.
- Return to primary and record both outcomes, durations, and policy revision.
Expected observation: the primary and standby requests each appear from their documented, narrowly allowlisted egress address; the API also requires the normal application credential; TLS validates; an unlisted controlled source is denied; and no request silently bypasses the proxy.
Use the proxy verification guide for a broader direct-versus-proxied workflow. Keep evidence small: timestamp, client release, redacted route label, expected and observed address, status class, duration, API policy revision, and correlation identifier.
Diagnose failures by decision point
| Observation | Likely boundary | First check |
|---|---|---|
| Proxy cannot be reached | Client to gateway | Check endpoint, protocol, firewall, and proxy authentication |
| Observed source differs | Provider routing | Compare assignment, address family, and failover state |
| API denies expected source | Policy | Check CIDR, stage, resource, effect, and deployment revision |
| Source allowed but API returns 401 | Application identity | Check destination credential and clock |
| Works on IPv4, fails on IPv6 | Dual-stack policy | Review DNS selection and IPv6 rule |
| Standby fails during incident | Untested recovery | Check assignment, allowlist, secret, and selection logic |
Operational limits: a verified static egress route proves one client, provider path, address family, API policy, and moment. It does not guarantee an address can never change, make source IP a complete identity, or prove every service process uses the same route. Availability depends on both proxy and destination, so retain independent authentication, monitoring, and recovery controls.
Select an assignment after the policy design is ready
Prepare the required address family, region, protocol, authentication mode, primary and standby expectations, concurrency, transfer estimate, maintenance window, and verification request. Then compare those requirements with current Mexela private proxy options and confirm available assignments before changing an API allowlist.
Frequently asked questions
Is a static proxy IP guaranteed never to change?
No. Treat stability as a service and change-management contract. Document replacement notice, verification, and failover instead of assuming permanence.
Can source IP replace an API key?
No. An allowlist is a network condition shared by systems behind the egress. Keep destination identity and authorization controls.
Should I allowlist the provider’s whole subnet?
Usually not. Use the narrowest maintainable host prefix or range supplied for the assignment and required recovery path.
Why must the IPv6 policy be reviewed?
A dual-stack client can present an IPv6 source that an IPv4-only rule does not cover. Test the exact family selection of the real client.
How should standby egress be introduced?
Pre-authorize its narrow prefix, test a read-only request, document selection and return rules, and review the temporary overlap.
Can I use documentation IPs in production policy?
No. TEST-NET addresses are for examples and are not globally reachable. Obtain production egress from a verified provider channel.

