Visitor Edge Proxy Origin
Routing & Security

Behind Cloudflare, Which IP Should the Origin Allowlist?

BYOIP.info Editorial4 December 2026 4 min read Last technically reviewed 4 December 2026

Key takeaways

  • A proxied Cloudflare request uses two separate connections: visitor to edge, and edge to origin.
  • Your origin firewall sees Cloudflare origin-facing egress IP on incoming packets, so allowlisting only the visitor IP blocks proxied traffic.
  • Cloudflare passes the visitor IP in the CF-Connecting-IP HTTP header, which your application should trust only after the firewall restricts access to Cloudflare egress.
  • Dedicated CDN egress is available on Enterprise plans, and a single BYOIP prefix binds to either CDN ingress or CDN egress rather than both simultaneously.

When a website sits behind Cloudflare’s proxy, a visitor’s browser never opens a direct network connection to your origin server. Instead, the visitor connects to Cloudflare, and Cloudflare opens a second connection to your origin. Knowing which IP address appears at the firewall versus inside HTTP headers prevents lockouts and forged-header mistakes.

For the foundational mechanics of source-address filtering, see What Is IP Allowlisting?. This walkthrough focuses specifically on the Cloudflare CDN proxy path.

One proxied HTTPS request, two separate connections

Trace one ordinary proxied HTTPS request to shop.example.net using documentation example addresses (RFC 5737):

  1. Connection 1 (Visitor to Cloudflare edge): The visitor at example address 198.51.100.42 resolves shop.example.net and connects to Cloudflare’s proxied edge destination 203.0.113.50.
  2. Connection 2 (Cloudflare edge to Origin): Cloudflare terminates the visitor’s TLS connection at the edge and opens a separate outbound HTTPS connection from a Cloudflare origin-facing IP (for example, shared egress 192.0.2.15, or Enterprise dedicated BYOIP egress 198.51.100.200) to your origin server.

Your origin firewall sees only Connection 2. The network source IP on the packet arriving at the origin firewall is Cloudflare’s egress IP, never the visitor’s IP 198.51.100.42. If you configure the origin firewall to allow only the visitor’s address, the proxied connection from Cloudflare is rejected.

What the visitor, firewall, and application each see

Compare the same proxied request to shop.example.net across all three vantage points and both egress models (all addresses are documentation examples):

Vantage pointShared Cloudflare egressDedicated Enterprise BYOIP egressOperational takeaway
VisitorSrc 198.51.100.42 -> Dst 203.0.113.50 (shop.example.net)Src 198.51.100.42 -> Dst 203.0.113.50 (shop.example.net)Changing Cloudflare’s origin-facing egress does not change the visitor IP or the public site destination
Origin firewallSees packet source 192.0.2.15 (from Cloudflare’s published origin-facing ranges)Sees packet source 198.51.100.200 (from your dedicated egress prefix)Allowlist Cloudflare’s egress source here; allowing only visitor IP 198.51.100.42 drops proxied traffic
Origin applicationReads HTTP header CF-Connecting-IP: 198.51.100.42Reads HTTP header CF-Connecting-IP: 198.51.100.42Application uses the header for logging or user-level logic only after the firewall confirms traffic came through Cloudflare

Inspect each vantage point below and toggle between shared and dedicated egress, or test a visitor-only firewall rule:

Cloudflare Proxied Request Inspector (Example Addresses)

Request to https://shop.example.net · visitor 198.51.100.42 · public edge 203.0.113.50.

Visitor address (fixed)
198.51.100.42
Public site destination (fixed)
203.0.113.50
Origin-side source IP
192.0.2.15

Connection 2: Packet arriving at the origin firewall

The origin firewall sees packet source 192.0.2.15 (example shared Cloudflare origin-facing range). It never sees visitor IP 198.51.100.42 in the TCP/IP packet header.

Allowed: packet source 192.0.2.15 matches the origin allowlist.

With shared egress, your firewall allows Cloudflare published origin-facing ranges so proxied requests reach the origin.

Where the visitor IP appears and why the trust boundary matters

To let your application know who initiated the request, Cloudflare adds documented HTTP request headers such as CF-Connecting-IP (carrying 198.51.100.42 in our example; see Cloudflare HTTP request headers).

Keep the trust boundary clear: an HTTP header is plain request data, not a network-layer guarantee. If your origin server accepts direct connections from the wider internet on port 443, any external client can connect straight to the origin and send a forged CF-Connecting-IP header. Your origin firewall must first restrict inbound connections to Cloudflare’s origin-facing egress (and ideally pair that with Authenticated Origin Pulls or Cloudflare Tunnel) before your application treats CF-Connecting-IP as trustworthy.

Shared Cloudflare ranges vs. dedicated CDN egress

Standard proxied setups allowlist Cloudflare’s published shared IP ranges at the origin firewall. That keeps direct-to-origin scans off your server, yet those shared ranges also originate traffic for other Cloudflare customers.

Organizations that need a tighter origin allowlist can use dedicated CDN egress, which Cloudflare offers on Enterprise plans. With BYOIP, Cloudflare’s BYOIP service bindings documentation notes an important design constraint: a single BYOIP prefix is bound to either CDN ingress or CDN egress, not both at the same time. If you want both custom ingress addresses for visitors and dedicated BYOIP egress addresses toward your origin, plan separate prefixes for each role.

FAQ

What Is IP Allowlisting?
Dedicated vs Shared IP Addresses: Which Do You Need?
What Is BYOIP? A Practical Guide to Bringing Your Own IP Addresses
Cloudflare - Origin-facing IP addresses
Cloudflare - HTTP request headers (CF-Connecting-IP)
Cloudflare - BYOIP service bindings

Continue the series