IP Address and ASN Fields in Logs, Rules, and Traffic Policies
How Cloudflare names client, source, destination, and ASN fields across Logpush, Rules language, Gateway policies, and WAF—and when each value differs.
This page summarises Cloudflare documentation on how IP addresses and Autonomous System Numbers (ASNs) appear in Logpush datasets, the Rules language, Cloudflare One traffic policies, and related security products. The same network fact—a visitor’s address or its ASN—is often exposed under different field names depending on whether you are writing a rule, exporting logs, or correlating Zero Trust sessions.
IP and ASN: what the documentation is naming
Section titled “IP and ASN: what the documentation is naming”An IP address field records an IPv4 or IPv6 address (or, in policy builders, a CIDR range). An ASN field is a numeric autonomous system identifier (sometimes paired with a description or organisation name). Cloudflare does not use one universal name: ClientIP usually means the visitor on a proxied HTTP or firewall event, while SourceIP / DestinationIP describe ends of a session or packet, and ActorIP / ActorIPAddress refer to whoever performed an account action in audit logs.
| Role in traffic | Typical Rules language | Logpush (examples) | Policy builders (Gateway) |
|---|---|---|---|
| Visitor / client | ip.src, ip.src.asnum |
ClientIP, ClientASN |
Source IP selectors |
| Request target | ip.dst, ip.dst.asnum |
OriginIP, DestinationIP, DstIP |
Destination IP selectors |
| Edge → origin path | cf.edge.server_ip (BYOIP) |
EdgeServerIP, OriginIP |
— |
| Admin / API actor | — | ActorIP, ActorIPAddress |
— |
ASN values in logs are usually integers (ClientASN, SourceAS); IP access rules also accept the string form AS13335.
Rules language: ip.src, ip.dst, and ASN on the client
Section titled “Rules language: ip.src, ip.dst, and ASN on the client”What is ip.src (client IP for HTTP rules)?
Section titled “What is ip.src (client IP for HTTP rules)?”For request-scoped rules, ip.src is the client TCP IP address, which may be adjusted using headers such as X-Forwarded-For or X-Real-IP:
The client TCP IP address, which may be adjusted to reflect the actual address of the client using HTTP headers such as X-Forwarded-For or X-Real-IP.
— Cloudflare,
ip.src
Use this field when matching visitors in WAF, Transform Rules, or similar Request category rules—not when you need the literal IP header from a raw network packet (see network firewall fields below).
What is ip.src.asnum?
Section titled “What is ip.src.asnum?”ip.src.asnum is the AS number associated with the client IP. Cloudflare documents it as equivalent to the deprecated ip.geoip.asnum and recommends ip.src.asnum for new rules:
The 16-bit or 32-bit integer representing the Autonomous System (AS) number associated with the client IP address.
— Cloudflare,
ip.src.asnum
Network firewall and packet filtering expressions use ip.src / ip.dst at the IP-packet layer (“source address of the IP Packet”, “destination address as specified in the IP packet”), with ip.src.asnum and ip.dst.asnum for AS numbers on source and destination.
When does cf.edge.server_ip apply?
Section titled “When does cf.edge.server_ip apply?”cf.edge.server_ip is not a generic visitor field. It is meaningful for BYOIP customers:
Represents the global network’s IP address to which the HTTP request has resolved.
This field is only meaningful for BYOIP customers.
— Cloudflare,
cf.edge.server_ip
Do not substitute it for ClientIP in Logpush or for OriginIP unless your deployment uses BYOIP and the documentation for that product applies.
Logpush: ClientIP, origins, edge, and classification
Section titled “Logpush: ClientIP, origins, edge, and classification”HTTP and firewall datasets
Section titled “HTTP and firewall datasets”Account HTTP Requests and zone HTTP Requests expose:
ClientIP— IP address of the client (IPv4 or IPv6).ClientASN— client AS number.ClientIPClass— classification such assearchEngine,tor,allowlist,badHost, and others.EdgeServerIP— IP of the edge server making a request to the origin; may be empty if no origin request occurred.OriginIP— IP of the origin server.
Firewall Events (account and zone) use ClientIP, ClientASN, ClientASNDescription, and the same ClientIPClass value set:
Possible values are: unknown | badHost | searchEngine | allowlist | monitoringService | noRecord | scan | tor.
— Cloudflare, Firewall Events (account)
Correlate WAF or firewall actions with HTTP logs using ClientIP and timestamp; use OriginIP when the question is which backend answered, not who visited the site.
Audit and access logs (actor vs client)
Section titled “Audit and access logs (actor vs client)”Audit Logs record ActorIP as the “physical network address of the actor.” Audit Logs v2 use ActorIPAddress with the same meaning. Access Requests use IPAddress for the client. These are administrative or Access flows—not interchangeable with ClientIP on HTTP request logs.
DNS, Gateway, and network analytics
Section titled “DNS, Gateway, and network analytics”DNS-related datasets distinguish resolver and upstream paths:
- DNS Logs / DNS Firewall Logs:
SourceIP(client),EDNSSubnet(ECS when resolvers send it—not all do), and on firewall logsUpstreamIP. - Gateway DNS:
SrcIP,DstIP, authoritative nameserver IPs, and DoH/DoT subdomains.
Network Analytics Logs expose packet-level IPSourceAddress / IPDestinationAddress, computed IPSourceSubnet / IPDestinationSubnet (/24 IPv4, /64 IPv6), and SourceASN / DestinationASN with names. Magic Network Monitoring Flow Logs mirror flow-style SourceAddress, DestinationAddress, and AS fields.
Zero Trust session fields: public vs internal source
Section titled “Zero Trust session fields: public vs internal source”Gateway HTTP, Gateway Network, and Zero Trust Network Session Logs pair SourceIP with SourceInternalIP:
Internal IP of the device. For Cloudflare One Client (WARP) traffic, this is the WARP CGNAT address. For GRE/IPsec on-ramps, this is the source IP behind the tunnel.
— Cloudflare, Gateway HTTP
DestinationIP / OriginIP describe the target; session logs add EgressIP (source IP when egressing to the origin), InitialOriginIP (FQDN policy correlation), and Offramp (e.g. INTERNET, WARP, MAGIC). Investigating “which user device” usually requires SourceInternalIP or DEX device state public vs private fields—not ClientIP alone on a zone HTTP dataset.
Gateway and egress policies: matching on source and destination IP
Section titled “Gateway and egress policies: matching on source and destination IP”HTTP policies, network policies, and egress policies let you filter on Source IP and Destination IP.
For HTTP policies, destination IP applies only to traffic sent through the Cloudflare One Client:
Only applies to traffic sent through the Cloudflare One Client.
The IP address of the request’s target.
— Cloudflare, HTTP policies
API-style examples from the docs use expressions such as http.conn.src_ip[*] in {10.0.0.0/8} and net.dst.ip[*] in {10.0.0.0/8}. Source IP is documented as “the originating IP address or addresses of a device proxied by Gateway”—align policy tests with SourceIP / SourceInternalIP in Gateway Logpush, not only zone ClientIP.
WAF IP access rules and threat context
Section titled “WAF IP access rules and threat context”WAF IP access rules parameters accept IPv4, IPv6, or AS13335-style ASN identifiers. Logpush ClientIPClass complements static lists by labelling known categories (search engines, Tor, scans). For ASN metadata outside logs, Threat Intelligence APIs document ASN Intelligence (GET overview for a numeric ASN on an account).
DEX, email, and specialty datasets (scope limits)
Section titled “DEX, email, and specialty datasets (scope limits)”DEX Application Tests expose detailed HTTPClientIPAddress / HTTPServerIPAddress and traceroute source/destination IP fields; Cloudflare marks many of these HTTP tests only or Traceroute tests only. Email Security Alerts use SMTPHeloServerIP with ASN name/number. Turnstile, WebSocket Analytics, and Zaraz Events each define their own ClientIP or IP column—always read the dataset schema before joining to HTTP ClientIP.
Cloudflare One Client MDM override api endpoint is unrelated to log field names but shows how strictly Cloudflare validates IP strings: the value must be a valid IPv4 or IPv6 address or the client fails to parse the MDM file.
Common mistakes when correlating IPs across products
Section titled “Common mistakes when correlating IPs across products”- Assuming
ClientIPin zone HTTP logs equalsSourceIPin Gateway logs without checkingSourceInternalIPand offramp type. - Using
EdgeServerIPas the visitor address; it describes the edge→origin hop, and may be empty. - Treating
EDNSSubnetas always present; documentation states not all resolvers send ECS. - Applying HTTP policy Destination IP to traffic that never went through the Cloudflare One Client.
- Joining logs on ASN alone; use IP plus time window and shared identifiers (request ID where available).
How to check this on your site
Section titled “How to check this on your site”-
In the Cloudflare dashboard, open Analytics & Logs → Logpush, select your job, and confirm the dataset schema (for example HTTP Requests or Gateway HTTP) lists the IP/ASN fields you expect.
-
Trigger a test request and verify exported records:
ClientIP/ClientASNon HTTP or firewall datasets, orSourceIP/DestinationIPon Gateway datasets, match the scenario you tested. -
If you use rules, open the relevant field reference and compare
ip.src/ip.src.asnumevaluation to the same request’s LogpushClientIP/ClientASN, accounting for header-adjusted client IP behavior. -
For Zero Trust, inspect Zero Trust Network Session Logs for
SourceInternalIP,EgressIP, andOfframpwhenSourceIPalone does not identify the device. -
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.