Skip to content

CDN Edge IPs vs True Client Egress

Globe network visualization over a city skyline

TL;DR: Logs that show a CDN or reverse-proxy address are not the visitor’s home IP. Read forwarded client headers carefully, and verify what your browser egress looks like with a direct IP address inquiry when debugging allowlists.

Why edge addresses dominate modern logs

Sites fronted by Cloudflare, Fastly, CloudFront, or similar terminate TLS at the edge. Origin servers then see TCP connections from the CDN, not from end users. Access logs that only print the socket peer will list PoP addresses in CDN ASNs—useless for per-customer allowlisting if taken literally.

Mobile apps and APIs behind API gateways show the same pattern: the gateway IP repeats thousands of times while real clients hide in headers.

Headers that carry the client—when you can trust them

Common fields include X-Forwarded-For, X-Real-IP, and vendor-specific headers such as CF-Connecting-IP. Trust rules matter:

  • Only honor forwarded headers from IP ranges you control or contractually trust.
  • Prefer the rightmost or leftmost entry according to your proxy chain documentation—guessing causes off-by-one identity bugs.
  • Attackers can inject X-Forwarded-For on direct-to-origin paths if the origin is exposed; keep origin dark.

Misconfigured trusts produce “clients” in impossible countries or private RFC1918 addresses that never touched your network.

Allowlists at the wrong layer

If a partner asks you to allowlist “their IP” and they sit behind a CDN, they may accidentally give you the edge address that rotates. Ask for the egress that originates from their office firewall or NAT, confirmed on a non-CDN tool page from the same network path as the integration.

How to verify your own egress during integration tests

From the machine that will call the API:

  • Disable extra browser extensions that force proxies.
  • Open an IP inquiry page and record the address plus ASN.
  • Compare with what the partner’s logs show for your test requests.
  • If they see a CDN and you see a residential ISP, you are not on the same path—perhaps they logged the wrong header.

Corporate SWG products may make your inquiry page show a datacenter ASN even at home. Call that out in the ticket so nobody “fixes” the wrong network.

Sticky sessions and anycast confusion

Anycast CDN IPs are shared; geographic POPs answer the same address from different cities. Do not geolocate a CDN anycast address and assume the user is in that city. For user geo, use the connecting-IP header after trust validation, then apply GeoIP with the usual uncertainty.

Writing runbooks that survive shift changes

Document: where client IP is extracted, which header is authoritative, how to dump a sample request, and how engineers should capture their egress when updating firewall rules. Include a note that localhost tests and CI runners have different egress than laptops.

When you need a clean reading of the path your browser actually takes, use www.whatismyipaddressinquire.com from that same browser profile. Compare that value to origin logs after header parsing—not to the raw socket peer behind a CDN.

Edge IPs explain infrastructure. Client egress explains people. Label them separately and half of your allowlist outages disappear.