Dedicated Egress IP Policies, CDN Origin Connection, and Allowlisting
How Cloudflare Gateway and CDN dedicated egress IPs work, how to configure egress policies, and how to fix traffic that does not use your allowlisted source addresses.
This page summarises Cloudflare documentation on dedicated egress IPs: static addresses reserved for your account so upstream firewalls, SaaS allowlists, and origin servers can trust a small set of source IPs. Cloudflare offers two separate products—Dedicated CDN Egress IPs (origin-bound CDN/WAF traffic, formerly Aegis) and Gateway dedicated egress IPs (Zero Trust user traffic leaving toward the public Internet)—and they are not interchangeable.
Zero Trust dedicated egress IPs control the IPs used by WARP and Gateway traffic when it leaves Cloudflare toward the Internet. They are different from Dedicated CDN Egress IPs, which control the IPs used by the Cloudflare CDN when connecting to your origin server.
— Cloudflare, Data Localization — Zero Trust
Dedicated CDN Egress IPs vs Gateway dedicated egress IPs: which product you need
Section titled “Dedicated CDN Egress IPs vs Gateway dedicated egress IPs: which product you need”Dedicated CDN Egress IPs answer the question “which IP does Cloudflare use when my CDN connects to my origin?” Enterprise customers use them for layer 7 WAF, CDN, and Spectrum so the origin can allowlist a short list of addresses instead of Cloudflare’s shared egress pool. See Dedicated CDN Egress IPs.
Gateway dedicated egress IPs answer “which IP do my users show when traffic exits to the Internet through Cloudflare Gateway?” They are an add-on on Zero Trust Enterprise plans and pair with egress policies. By default, proxied Gateway traffic uses a shared Cloudflare public IP range; dedicated IPs are assigned only to your account.
| Concern | Product | Typical allowlist on |
|---|---|---|
| Origin firewall / Workers → origin | Dedicated CDN Egress IPs | Your origin or private network |
| SaaS IP restrictions (banks, M365, S3) | Gateway dedicated egress IPs | Vendor allowlist or Entra named location |
| Log delivery with fixed source IP | Dedicated CDN Egress IPs + Logpush proxy zone | Log destination |
Dedicated CDN Egress IPs: origin allowlisting and zone setup
Section titled “Dedicated CDN Egress IPs: origin allowlisting and zone setup”What Dedicated CDN Egress IPs do on the path to your origin
Section titled “What Dedicated CDN Egress IPs do on the path to your origin”When Cloudflare acts as a reverse proxy, client traffic ingresses at a nearby data center; connections egress from Cloudflare toward your origin use either shared egress IPs or your dedicated pool. With dedicated CDN egress, only your reserved addresses connect to the origin, which supports tight firewall rules and use with Cloudflare Access and CNI.
Enterprise customers can leverage dedicated egress IPs for layer 7 WAF and CDN services, as well as Spectrum. The egress IPs are reserved exclusively for your account so that you can increase your origin security by only allowing traffic from a small list of IP addresses.
— Cloudflare, Dedicated CDN Egress IPs
Each pool is either BYOIP prefixes or Cloudflare-leased IPs—not both in one pool. A single BYOIP prefix may be used for CDN ingress or CDN egress, not both (service bindings).
How to turn on Dedicated CDN Egress IPs (aegis zone setting)
Section titled “How to turn on Dedicated CDN Egress IPs (aegis zone setting)”Work with your account team for a pool ID, then enable the zone setting via the Edit Zone Setting API (aegis):
curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/settings/aegis" \ --request PATCH \ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ --json '{ "id": "aegis", "value": { "enabled": true, "pool_id": "<EGRESS_POOL_ID>" } }'Leased CDN egress IPs appear under Address space → Leased IPs; BYOIP uses BYOIP prefixes.
CDN IPv4 connection forwarding and Regional Services
Section titled “CDN IPv4 connection forwarding and Regional Services”IPv6 dedicated ranges are deployed globally; IPv4 is scarcer, so not every data center holds your dedicated IPv4. Cloudflare may forward the origin connection within the same data center, another data center in the same location, or the closest location that holds your IP—without forwarding dedicated IPv4 across regions for spike load (connection forwarding).
Regional Services alone does not guarantee egress IP country for CDN→origin traffic; egress uses site-local IPs from the in-region data center where the request was processed. For guaranteed egress geolocation on allowlists (e.g. country-specific origin rules), combine Regional Services with Dedicated CDN Egress IPs (Cache — data localization).
Capacity: up to 40,000 concurrent connections per dedicated CDN egress IP per unique origin IP and port (egress IPs — connections). Dedicated CDN Egress IPs are not available on the China Network.
Gateway dedicated egress IPs: enablement, BYOIP, and limits
Section titled “Gateway dedicated egress IPs: enablement, BYOIP, and limits”How to turn on Gateway dedicated egress IPs
Section titled “How to turn on Gateway dedicated egress IPs”Contact your account team for dedicated addresses (at least two cities: IPv4 plus IPv6 range per data center). In the dashboard: Zero Trust → Traffic policies → Traffic settings, enable Allow Secure Web Gateway to proxy traffic, select TCP, and optionally UDP for HTTP/3 (Dedicated egress IPs).
Enterprise Gateway users may use BYOIP for dedicated egress: onboard prefixes, then in Gateway → Egress policies choose Use dedicated egress IPs (Cloudflare or BYOIP) (changelog — BYOIP Gateway). BYOIP dedicated egress IPs do not support IP geolocation updates the way Cloudflare-leased Gateway IPs do.
Dedicated egress IPs do not apply to: Cloudflare Tunnel private networks, Cloudflare WAN private destinations, ICMP, and (by default) DNS to custom resolvers—unless a resolver policy sends those queries from dedicated IPs. They are not supported on the China Network.
Gateway IPv4 vs IPv6 egress location
Section titled “Gateway IPv4 vs IPv6 egress location”IPv4 user traffic is routed internally to the data center where your dedicated IPv4 is provisioned, so the client’s “connected” POP may differ from physical egress. IPv6 can egress from the user’s local data center while IP geolocation still reflects the city configured in your egress policy (Egress location). One egress IP is limited to one data center; users in many regions need multiple IPs and policies tied to location or virtual networks.
IP geolocation databases may take at least six weeks to update; Cloudflare recommends a catch-all egress policy before assignment to reduce wrong regional content during that window.
Egress policies: static source IP for SaaS and third parties
Section titled “Egress policies: static source IP for SaaS and third parties”What egress policies control (Enterprise)
Section titled “What egress policies control (Enterprise)”Egress policies choose default Cloudflare egress vs dedicated egress IPs per connection, matching identity, destination IP, application, geolocation, virtual network, and more. Traffic with no match uses the closest dedicated egress location unless you define a catch-all to the default shared range (catch-all policy).
Many third-party services (for example, a bank or partner API) only allow connections from a known list of IP addresses. By default, traffic that exits through Cloudflare Gateway shares a source IP address with all other Cloudflare One Client users, so upstream services cannot identify your organization by IP alone.
— Cloudflare, Egress policies
Policies evaluate first match wins (top to bottom in the UI). Place specific rules above a catch-all. When using dedicated IPs, you must set a secondary IPv4 (0.0.0.0 for closest-user routing, or another location) for resilience; without fallback, primary POP failure can break routing (Use dedicated egress IPs).
Common patterns: destination IP for a partner API (learning path — egress policies), user group for finance SaaS (Egress IP best practices), and Microsoft 365 with Entra named locations. Cloudflare recommends Cloudflare Access over IP-only controls when the application supports it.
Host and Domain selectors: allowlisting pitfalls
Section titled “Host and Domain selectors: allowlisting pitfalls”For Domain, Host, and Application selectors, Gateway resolves the name at DNS time; the egress policy does not change the destination IP connected to. If egress and resolved destination regions differ, geo-restricted or IP-bound services may reject the session (host selectors). Prefer Destination IP with the service’s published ranges when policies appear ignored.
Egress policy troubleshooting: wrong IP, failover, and distance
Section titled “Egress policy troubleshooting: wrong IP, failover, and distance”Egress policy symptoms include traffic on a default Cloudflare IP, bad failover, or high latency from distant egress POPs.
| Symptom | Common cause | What to do |
|---|---|---|
| Not using dedicated egress IP | Domain/Host + legacy CGNAT resolved IP treated as internal | Use Destination IP or move off CGNAT |
| Not using dedicated egress IP | Higher-precedence policy matches first | Reorder or narrow precedence (Terraform v4 hash note) |
| Not using dedicated egress IP | Split Tunnel excludes destination | Route destination through WARP |
| Failover to shared IP | Cloudflare routing/config | Request IDs + support; temporarily swap primary/secondary |
| Distant egress (e.g. AU user, EU IP) | One global policy | User Location policies to nearest dedicated IP |
Enable Gateway Egress Logpush for evidence, or check egress from a test device (e.g. icanhazip as in Verify egress IPs).
How to check this on your site
Section titled “How to check this on your site”-
Confirm which product you use: CDN origin traffic → check zone aegis / Dedicated CDN Egress IPs pool; user Internet traffic → Dedicated egress IPs and Egress policies in Zero Trust.
-
For Gateway: connect a test device via the Cloudflare One Client and compare
https://ipv4.icanhazip.com/andhttps://ipv6.icanhazip.com/to the IPv4 and IPv6 from your account team or Address space → Leased IPs. -
For CDN: confirm your origin firewall allows the dedicated pool, then hit the origin through the orange-clouded zone and verify source IPs in origin logs match the pool (Check your IPs).
-
If policies look correct but IP is wrong, review Split Tunnel, policy precedence, and whether selectors use Domain/Host vs Destination IP (Troubleshoot Gateway).
-
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about, and we will correct or clarify it.