This is an old revision of the document!

Sometime you may configure CloudFlare CDN or other proxy in front of your web server, in this case, you may only see proxy IP instead of real visitor IPs.

How to restore real visitor IP instead of CloudFlare IP?

Go to your LiteSpeed Web Admin Console, Enable the option "Use Client IP in Header" in Configuration.

Once enabled, your access logs will now show the correct IP addresses, and even PHP's $_SERVER['REMOTE_ADDR'] variable will contain the client real IP address, instead of a CloudFlare IP address, which in itself will resolve most problems you could hit when enabling CloudFlare on PHP-enabled web sites (like WordPress or vBulletin installs).

Please also refer CloudFlare document.

The same is true for other proxy setup.

For example, Citrix Netscaler device servers the original IP record. You can customize it to use “X-Forwarded-For”, which is a standard header for that purpose. Then you should see the visitor original IPs.

You may also see gatewall ip/proxy ip with some null requests, which is normal. After one request served, before new request coming, the IP will be reset to the LB IP. When new request coming with “x-Forwarded-For” header, it will be updated. For keep-alive connection, in between two requests, the LB IP will shown on the real time request list.

To avoid proxy IP being blocked by server security setting, you should add LB IP to trusted IP list.

  • Admin
  • Last modified: 2016/06/08 14:19
  • by Jackson Zhang