Title: Corrected commenter IP for Cloudflare CDN
Author: guguan123
Published: <strong>11 de Abril de  2025</strong>
Last modified: 9 de Agosto de  2025

---

Buscar plugins

![](https://s.w.org/plugins/geopattern-icon/cfcdn-comment-ip-fix.svg)

# Corrected commenter IP for Cloudflare CDN

 Por [guguan123](https://profiles.wordpress.org/guguan123/)

[Descargar](https://downloads.wordpress.org/plugin/cfcdn-comment-ip-fix.0.1.4.zip)

 * [Detalles](https://cl.wordpress.org/plugins/cfcdn-comment-ip-fix/#description)
 * [Reseñas](https://cl.wordpress.org/plugins/cfcdn-comment-ip-fix/#reviews)
 *  [Instalación](https://cl.wordpress.org/plugins/cfcdn-comment-ip-fix/#installation)
 * [Desarrollo](https://cl.wordpress.org/plugins/cfcdn-comment-ip-fix/#developers)

 [Soporte](https://wordpress.org/support/plugin/cfcdn-comment-ip-fix/)

## Descripción

This WordPress plugin is designed to correct the inaccurate display of commenter
IP addresses on websites utilizing Cloudflare CDN. By processing proxy IPs from 
Cloudflare, this plugin ensures that the real commenter IP information is retrieved
and recorded. This is crucial for comment moderation, spam identification, and website
security analysis.

Please note: This plugin is provided by an independent developer and is not an official
Cloudflare product.

### Usage

 1. Ensure your WordPress website is correctly configured and proxied through Cloudflare
    CDN.
 2. Once activated, the plugin will automatically correct IP addresses in the following
    functionalities to display the real visitor IP:
 3.  * **User Comments:** The IP address recorded upon comment submission.
     * **Password Reset Emails:** The IP address included in password reset emails 
       sent to users.

This plugin requires no additional configuration; it works automatically upon activation.

### External Services

This plugin connects to the Cloudflare API to retrieve the latest list of Cloudflare
CDN IP addresses. This is necessary to ensure the plugin can accurately handle IP-
related functionalities, such as fixing comment IP detection when Cloudflare’s CDN
is in use.

### What the service is and what it is used for

The plugin uses the Cloudflare API (specifically the `https://api.cloudflare.com/
client/v4/ips` endpoint) to fetch the current list of Cloudflare CDN IP addresses.

### What data is sent and when

The plugin **does not send any user-specific data** to the Cloudflare API. It only
makes a simple GET request to the API endpoint to retrieve the IP list. This request
occurs when the plugin needs to refresh the IP list.

### Service provider

The service for retrieving Cloudflare IP lists is provided by Cloudflare, Inc..

### Links to terms of service and privacy policy

 * Terms of Service: https://www.cloudflare.com/terms/
 * Privacy Policy: https://www.cloudflare.com/privacypolicy/

The retrieval of this information (Cloudflare IP list) ensures the plugin functions
correctly with Cloudflare’s CDN services. No personal or sensitive user data is 
transmitted during this process.

### Libraries Used

 * **[IPLib](https://github.com/mlocati/ip-lib)**: Used for parsing and matching
   IP addresses.

## Instalación

 1. Upload the `cfcdn-comment-ip-fix` folder to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the ‘Plugins’ menu in your WordPress dashboard.

## FAQ

### Why do I need this plugin?

When your website uses Cloudflare CDN, all visitor IP addresses may be replaced 
by Cloudflare’s proxy IP addresses. This prevents you from obtaining accurate visitor
source information for comment management, user behavior analysis, or security auditing.
This plugin aims to correct these IP addresses, ensuring you get the real IP information
to better manage your website.

### Does the plugin support IPv6?

Yes, this plugin supports the retrieval and correction of IPv6 addresses.
 However,
for IP correction in **password reset emails**, the current optimization primarily
targets IPv4 addresses. If your website predominantly uses IPv6 for its origin server,
the IP correction functionality in emails might not fully cover IPv6 addresses. 
I am continuously improving this feature to provide more comprehensive IPv6 support.

### Does the plugin automatically update Cloudflare’s IP list?

Yes, the plugin automatically updates Cloudflare’s IP list daily to ensure it is
always current and accurate.

### Will the plugin affect my website’s performance?

This plugin is designed to operate without significantly impacting core website 
performance. It primarily corrects IP addresses in low-frequency scenarios such 
as user comment submissions and password reset email dispatches, thus not causing
a noticeable performance impact under normal traffic.

### Does this plugin support other CDNs?

Currently, this plugin **only supports Cloudflare CDN**. However, you can manually
add IP addresses from other CDNs. It retrieves the real IP via the X-Forwarded-For
header.

## Reseñas

No hay reseñas para este plugin.

## Colaboradores & Desarrolladores

“Corrected commenter IP for Cloudflare CDN” es software de código abierto. Las siguientes
personas han contribuido a este plugin.

Colaboradores

 *   [ guguan123 ](https://profiles.wordpress.org/guguan123/)

[Traduce “Corrected commenter IP for Cloudflare CDN” a tu idioma.](https://translate.wordpress.org/projects/wp-plugins/cfcdn-comment-ip-fix)

### ¿Interesado en el desarrollo?

[Revisa el código](https://plugins.trac.wordpress.org/browser/cfcdn-comment-ip-fix/),
echa un vistazo al [repositorio SVN](https://plugins.svn.wordpress.org/cfcdn-comment-ip-fix/),
o suscríbete al [registro de desarrollo](https://plugins.trac.wordpress.org/log/cfcdn-comment-ip-fix/)
por [RSS](https://plugins.trac.wordpress.org/log/cfcdn-comment-ip-fix/?limit=100&mode=stop_on_copy&format=rss).

## Historial de cambios

#### 0.1.4

改进了国际化支持，更符合WordPress的要求

#### 0.1.3

 * Improved: Comprehensive formatting and content optimization of the `readme.txt`
   file to comply with WordPress.org standards.
 * Fixed: Correctly identify the real IP when the X-Forwarded-For request header
   contains multiple IPs.

#### 0.1.2

 * Added: IP address correction for password reset emails.
 * Improved: IPv6 support.

#### 0.1.1

 * Initial release.

## Meta

 *  Versión **0.1.4**
 *  Última actualización **hace 8 meses**
 *  Instalaciones activas **Menos de 10**
 *  Versión de WordPress ** 6.0 o superior **
 *  Probado hasta **6.8.5**
 *  Versión de PHP ** 7.0 o superior **
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/cfcdn-comment-ip-fix/)
 * Etiquetas
 * [cdn](https://cl.wordpress.org/plugins/tags/cdn/)[cloudflare](https://cl.wordpress.org/plugins/tags/cloudflare/)
   [comments](https://cl.wordpress.org/plugins/tags/comments/)[real ip](https://cl.wordpress.org/plugins/tags/real-ip/)
   [security](https://cl.wordpress.org/plugins/tags/security/)
 *  [Vista Avanzada](https://cl.wordpress.org/plugins/cfcdn-comment-ip-fix/advanced/)

## Calificaciones

Aún no se han enviado valoraciones.

[Your review](https://wordpress.org/support/plugin/cfcdn-comment-ip-fix/reviews/#new-post)

[Ver todas las reseñas](https://wordpress.org/support/plugin/cfcdn-comment-ip-fix/reviews/)

## Colaboradores

 *   [ guguan123 ](https://profiles.wordpress.org/guguan123/)

## Soporte

¿Tienes algo que decir? ¿Necesitas ayuda?

 [Ver el foro de soporte](https://wordpress.org/support/plugin/cfcdn-comment-ip-fix/)

## Donar

¿Te gustaría apoyar el avance de este plugin?

 [ Donar para este plugin ](https://qr.alipay.com/fkx17591v9cegbc196ly4b3)