Notes
open one at a time
1.What it can cause
Anyone who learns the load balancer's address can skip Cloudflare: its WAF, its bot protection and its rate limits.
- Anyone who learns the load balancer's address can skip Cloudflare: its WAF, its bot protection and its rate limits.
- DDoS protection bought at the edge does nothing for traffic sent straight to the origin.
- The address is easy to find. Old DNS records and certificate scans give it away.
2.Why it is wrong
Address groups express intent - “the CDN’s edge” - instead of an IP list that goes stale the next time the provider publishes new ranges.
Traffic can bypass the CDN and the WAF by hitting the load balancer directly. Locking it means allowing only Cloudflare’s published ranges, which change, which is exactly what an address group is for.
The idea
Address groups express intent - “the CDN’s edge” - instead of an IP list that goes stale the next time the provider publishes new ranges.
Learn it
3.How you would find it
curl -sI --resolve harbour.example:443:34.120.95.195 https://harbour.example/ | head -1
# does the origin answer someone who is not the CDN?curl -sI --resolve harbour.example:443:34.120.95.195 \ https://harbour.example/ | head -1 gcloud compute security-policies describe harbour-waf \ --format="yaml(rules)"4.The change that closes it
Cloud Armor policy: default deny, allow only the cloudflare-edge address group.
- As found
- No source restriction on the backend service’s security policy.
- Fixed
- Cloud Armor policy: default deny, allow only the cloudflare-edge address group.
gcloud network-security address-groups create cloudflare-edge \ --type=IPV4 --capacity=100 --location=global gcloud compute security-policies rules create 1000 \ --security-policy=harbour-waf --action=allow \ --src-ip-ranges="$(cat cloudflare-ranges.txt)"5.When to fix it
Phase 3, Close the bypasses
Phase 3, Close the bypasses, together with D6. Makes the protections that already exist actually apply. Cheaper than adding new ones.
Cannot start until
Nothing. It can start as soon as its phase does.
Unblocks
Nothing waits on it.