Skip to main content

Correct visitor IP when using CloudFlare

Cloudflare proxies traffic to your origin server. For this reason in your logs and when WSC Protect records IP information in the WSC Protect log, it will record Cloudflare's IP and not the real visitors' IP. To correct this you can use Mod Remote_IP to correct the information we receive from Cloudflare. As this is not a problem with WSC we are unable to assist you with installing Mod Remote_IP but we are providing instructions below. If you use a control panel like cPanel your host or control panel provider should help you install Remote_IP if you are not sure. 

cPanel

cPanel has provided detailed instructions on how to enable Mod Remote_IP. See the post located on the cPanel website. Unfortunately, this does require some technical knowledge. Make sure you can complete this or you could end up with a broken server, If in doubt, ask cPanel for assistance.

LiteSpeed

If you use LiteSpeed you can log in to the LiteSpeed administration area. Navigate to Server > General > General Settings and tick the “Use Client IP in Header” option. Remember to restart the web server for the new settings to take effect.

remote_ip-litespeed.png

Other Systems

Cloudflare provides a range of instructions for other systems. These guides can be found here.