services / cloudflare

Cloudflare IP ranges

Official Cloudflare ranges from the vendor's publication, split by purpose: edge. The ranges below render live from the signed slash0 feed.

The feed classifies this service as cdn-shared: these are shared edge ranges, and allowlisting them admits whatever runs behind the same edge, not only Cloudflare.

purposedirectionIPv4IPv6
cloudflare/edgeboth··

cloudflare/edge

Direction: both. Cloudflare publishes these ranges for traffic in either direction; use them in the rule direction your integration needs. The example below shows egress.

loading ranges from the feed…

Terraform

data "ipranges_egress" "cloudflare_edge" {
  service = "cloudflare"
  purpose = "edge"
}

resource "aws_security_group_rule" "cloudflare_edge" {
  type              = "egress"
  from_port         = 443
  to_port           = 443
  protocol          = "tcp"
  cidr_blocks       = data.ipranges_egress.cloudflare_edge.ipv4_cidrs
  ipv6_cidr_blocks  = data.ipranges_egress.cloudflare_edge.ipv6_cidrs
  security_group_id = aws_security_group.app.id
}

keep rules current automatically

Terraform data sources refresh only when you run an apply. The hosted tier publishes the same data via AWS managed prefix lists (slash0.cloudflare.edge.v4 and so on), shared into your account via AWS RAM: rules reference one pl-… id and update within a minute of a vendor change, with removals held through a 72 hour grace window. Request early access or read how it works.

provenance

Ranges come from Cloudflare's official publication: https://www.cloudflare.com/ips/. Fetched sources:

Every publish is signed (ECDSA P-256 over the feed index, each service document hash-chained to it) and every range change is recorded in the changelog. Verification steps: security. Provider setup: quickstart.