Cloudflare Docs
Network
Edit this page on GitHub
Set theme to dark (⇧+D)

Pseudo IPv4

Cloudflare customers can use Pseudo IPv4 if their origin web server only understands IPv4 formatted IP addresses (meaning it would not support Cloudflare’s default IPv6 compatibility).

​​ Availability

FreeProBusinessEnterprise

Availability

YesYesYesYes

​​ Background

Some older origin server analytics and fraud detection software expect IP addresses in an IPv4 format and do not support IPv6 addresses.

Pseudo IPv4 uses the  Class E IPv4 address space to provide as many unique IPv4 addresses corresponding to IPv6 addresses as possible.

  • Example Class E IPv4 address: 240.16.0.1
  • Example IPv6 address: 2400:cb00:f00d:dead:beef:1111:2222:3333

​​ Configure Pseudo IPv4

Cloudflare offers three options for configuring Pseudo IPv4:

  • Off: Default value.
  • Add Header: Cloudflare automatically adds the Cf-Pseudo-IPv4 header with a Class E IPv4 address hashed from the original IPv6 address.
  • Overwrite Headers: If Pseudo IPv4 is set to Overwrite Headers - Cloudflare overwrites the existing Cf-Connecting-IP and X-Forwarded-For headers with a pseudo IPv4 address while preserving the real IPv6 address in CF-Connecting-IPv6 header.

To configure Pseudo IPv4:

To change the Pseudo IPv4 setting in the dashboard:

  1. Log in to your Cloudflare account and go to a specific domain.
  2. Go to Network.
  3. For Pseudo IPv4, choose your desired setting.
To change Pseudo IPv4 with the API, send a PATCH request with the value parameter set to your desired value ("off", "add_header", "overwrite_header").