Cloudflare Restore Real IP Address in Cpanel Server

When using Cloudflare, website visitors visit the Cloudflare CDN server configured as a reverse proxy server. Cloudflare CDN server fetches pages from your web server and caches them for a while, serving them to subsequent visitors. Your web application may report Cloudflare CDN server IP ad visitor IP as all requests to your website are coming from Cloudflare CDN. This can be a problem when you have an e-commerce website where you need to check visitor IPs to detect fraud signups/orders.

To restore the original visitor IP for visitors on cPanel Server running the Apache web server, you can use mod_remoteip. You can install mod_remoteip in WHM > EasyApache 4 > Apache Modules

enable mod_remoteip in cpanel EasyApache

You can also install mod_remoteip using command line

Login to SSH as user root or WHM > Terminal, then edit the file

At end of the file, add

You can find Cloudflare IP address at

Restart Apache

Back to Cloudflare

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *