Skip to content

CDN-detected hostnames

6 min readRecon Atlas

TL;DR. Route hostnames pointing to Cloudflare into your web testing queue and exclude the edge IP addresses from network port scans. Operators frequently drop these hostnames alongside the proxy addresses or waste scan bandwidth hammering CDN anycast edges. Your triage hangs on the address mappings inside dns/dnsx.json and dns/ips-providers.txt.


This chapter deepens Phase 4: Resolution, IP mapping and CDN filtering. It explains how to classify resolved hostnames when the IP address belongs to a content delivery network.

Passive

When dnsx returns an A record and cdncheck marks the IP as Cloudflare, what do you do with the hostname?

A tempting wrong answer is deleting the hostname from your inventory because third-party proxy infrastructure fronts the address. Another tempting wrong answer is launching port scans directly against the Cloudflare IP address.

You hold two files: dns/dnsx.json containing resolution records, and dns/ips-providers.txt containing provider classifications from cdncheck.

Route the data through three branches:

First, web testing. Keep the hostname in dns/resolved.txt. Cloudflare routes traffic using Server Name Indication and the HTTP Host header. The web application remains reachable through the edge. This feeds HTTP discovery in Phase 6.

Second, network port scanning. Remove the IP address from dns/ips-origin.txt. Cloudflare anycast addresses hit shared edge proxies. They miss target organization servers.

Third, origin discovery. Write the hostname into dns/cdn-hosts.txt for origin uncovering if your scope permits locating unproxied servers.

This strategy preserves web attack surface while preventing wasted scan traffic. You avoid firewall bans from edge proxies. You accept that backend network services stay unknown until you uncover the origin IP.

cdncheck sends 0 packets per second during local CIDR lookups. dnsx queries send 50 to 100 packets per second against trusted resolvers.

Your triage relies on dnsx and cdncheck in Phase 4.

dnsx reads subs/all.txt and queries trusted recursive resolvers. The tool outputs dns/dnsx.json. The host field comes from your subdomain lists. The a field comes from DNS A records. The cname field contains canonical alias targets.

cdncheck reads dns/ips.txt and matches addresses against published provider CIDRs offline. When an IP falls inside Cloudflare ranges, cdncheck writes the provider tag to dns/ips-providers.txt. Unmatched addresses go to dns/ips-origin.txt.

The source data cannot contain backend origin IP addresses hidden behind proxy edges. It cannot contain custom enterprise routing rules or prove whether backend applications answer requests behind Cloudflare.

The fields attach to your project workspace files:

subs/all.txt supplies input hostnames.

dns/dnsx.json stores the raw host, a, and cname fields.

dns/ips.txt stores extracted IPv4 addresses.

dns/ips-providers.txt stores each IP paired with its provider classification.

dns/ips-origin.txt stores IP addresses verified as unproxied infrastructure.

Terminal window
# Resolve collected hostnames to A and CNAME records
dnsx -l subs/all.txt -a -cname -resp -json -r ~/wordlists/resolvers-trusted.txt -silent -o dns/dnsx.json
Terminal window
# Extract unique IPv4 addresses from resolution results
jq -r '.a[]?' dns/dnsx.json | sort -u > dns/ips.txt
Terminal window
# Identify CDN and WAF providers for each address
cdncheck -i dns/ips.txt -resp -silent > dns/ips-providers.txt
Terminal window
# Separate non-CDN origin addresses for network port scanning
cdncheck -i dns/ips.txt -e -silent -o dns/ips-origin.txt
# SAMPLE, invented
{"host":"api.example.com","a":["203.0.113.10"],"provider":"cloudflare"}
{"host":"login.example.com","a":["203.0.113.20"],"cname":["login.example.com.cdn.cloudflare.net"],"provider":"cloudflare"}
{"host":"direct.example.com","a":["203.0.113.30"],"provider":""}

The first record covers api.example.com resolving to 203.0.113.10 with provider cloudflare. This record asserts that api.example.com terminates on Cloudflare edge infrastructure. This record does not assert that the API application is inactive. It leaves the origin IP unstated. Keep api.example.com in dns/resolved.txt for Phase 6. Drop 203.0.113.10 from dns/ips-origin.txt.

The second record covers login.example.com resolving through CNAME login.example.com.cdn.cloudflare.net to 203.0.113.20 with provider cloudflare. This record asserts that the target routes through Cloudflare using a canonical name alias. This record does not assert a dangling CNAME record. Live Cloudflare edge servers answer queries. Keep login.example.com in dns/resolved.txt for web testing. Exclude 203.0.113.20 from dns/ips-origin.txt.

The third record covers direct.example.com resolving to 203.0.113.30 with an empty provider tag. This record asserts that direct.example.com resolves directly to target infrastructure in ASN 64496. This record does not assert that the host lacks local host firewalls. Keep direct.example.com in dns/resolved.txt. Write 203.0.113.30 into dns/ips-origin.txt for port scanning in Phase 5.

A frequent false positive occurs when port scanners probe Cloudflare edge IP 203.0.113.10 and report port 8443 open. Scanners flag an active HTTPS service and report an exposed administrative portal for api.example.com.

Direct banner and certificate checks kill this finding. Connect to port 8443 using curl:

Terminal window
# Inspect the TLS response and headers on the open edge port
curl -k -s -I --connect-timeout 5 https://203.0.113.10:8443/

The response returns HTTP status code 400 or 403 with a Server: cloudflare header and a cf-ray identifier. The TLS certificate belongs to Cloudflare wildcards. Cloudflare listens on port 8443 across its anycast network to handle alternative HTTPS proxy traffic. The open port belongs to CDN edge infrastructure. It yields no access to backend administrative panels.

When recording this result, write this exact sentence in your notes: Host api.example.com routes through Cloudflare edge IP 203.0.113.10; open port 8443 represents standard CDN reverse proxy infrastructure.

This step cannot see the true backend origin IP address behind the Cloudflare proxy.

DNS queries return edge anycast addresses. The server hosting application code sits behind the proxy. Misconfigurations on the origin server, such as unauthenticated management panels or debug listeners, remain invisible to forward DNS.

Origin discovery catches this gap. You search historical DNS archives in SecurityTrails, find SSL certificates matching example.com on raw IP addresses with tlsx, and inspect outbound email headers.

Origin discovery belongs to a separate workflow. It relies on historical telemetry and out-of-band application behavior. Phase 4 focuses strictly on categorizing current forward resolution records.

Stop testing the edge IP address once cdncheck confirms the Cloudflare provider tag. Leave the hostname in your active web target list. Drop the IP address from network port scans. Avoid running heavy vulnerability scanners against raw Cloudflare IP addresses.

Program rules strictly forbid network attacks or port scans directed at shared CDN infrastructure. Scanning Cloudflare anycast ranges creates noisy alerts for the provider. It yields zero valid findings for the target organization.

Set a strict time limit of 5 minutes per batch for dnsx and cdncheck. Local CIDR matching finishes in seconds.

In an automated reconnaissance pipeline, implement a fail-closed policy. If cdncheck fails to run, or if the provider database fails to load, the pipeline treats every resolved IP address as a CDN address. The pipeline routes all hostnames to HTTP testing and writes zero addresses to dns/ips-origin.txt. This prevents accidental port scans against CDN ranges during tool errors.

Your resolution workflow hands off two files to subsequent phases: dns/resolved.txt and dns/ips-origin.txt.

The file dns/resolved.txt contains a single column listing fully qualified domain names that resolved to active IP addresses:

api.example.com
login.example.com
direct.example.com

The file dns/ips-origin.txt contains a single column listing unique IPv4 addresses confirmed as non-CDN origin servers:

203.0.113.30

The next phase reads dns/resolved.txt and asks one core question: Which resolved hostnames answer with live HTTP and HTTPS services on web ports? You hand this list directly to Phase 6: Live hosts and screenshots.

The origin port scanning phase reads dns/ips-origin.txt and asks: Which TCP and UDP ports listen on verified target origin servers? You hand that list to Phase 5: Port scanning.

Where Claim Why it is uncertain
Phase 4 cdncheck -resp prints provider names alongside matched IP addresses Recent versions of cdncheck changed CLI flags; verify whether your build requires -resp or -match to output provider labels.
Phase 4 cdncheck local database contains complete Cloudflare BYOIP ranges Enterprise Cloudflare customers using custom IP prefixes may not appear in default public range feeds.
Phase 4 dnsx -resp -json includes CNAME and A records in one JSON line Output key structures can vary depending on dnsx minor release versions.
Connections0 backlinks · 3 outgoingFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Recon AtlasFor authorized testing only. Your scope is the map edge.