Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
litespeed_wiki:config:show-real-ip-behind-cloudflare [2016/06/29 13:41]
Rob Holda
litespeed_wiki:config:show-real-ip-behind-cloudflare [2018/11/14 16:57]
Jackson Zhang
Line 11: Line 11:
  
 {{ :​litespeed_wiki:​config:​cloudflare-unblock.png?​nolink&​850 |}} {{ :​litespeed_wiki:​config:​cloudflare-unblock.png?​nolink&​850 |}}
 +
 +the list of cloudflare IP subnet is available at [[https://​www.cloudflare.com/​ips/​|https://​www.cloudflare.com/​ips/​]]
 +Your litespeed configuration ACL allowed configuration should looks like
 +
 +  ALL, 103.21.244.0/​22T,​ 103.22.200.0/​22T,​ 103.31.4.0/​22T,​ 104.16.0.0/​12T,​ 108.162.192.0/​18T,​ 131.0.72.0/​22T,​ 141.101.64.0/​18T,​ 162.158.0.0/​15T,​ 172.64.0.0/​13T,​ 173.245.48.0/​20T,​ 188.114.96.0/​20T,​ 190.93.240.0/​20T,​ 197.234.240.0/​22T,​ 198.41.128.0/​17T,​ 199.27.128.0/​21T
  
 If there is another layer of proxy setup in front of LiteSpeed Web Server on the same server box, such as CloudFlare Railgun, Nginx, or Varnish, you also need to add that server IP to the trusted list. If there is another layer of proxy setup in front of LiteSpeed Web Server on the same server box, such as CloudFlare Railgun, Nginx, or Varnish, you also need to add that server IP to the trusted list.
Line 16: Line 21:
 Once enabled, your access logs will show the correct IP addresses and even PHP's $_SERVER['​REMOTE_ADDR'​] variable will contain your visitors'​ real IP addresses instead of a CloudFlare IP address. This will resolve most problems that might occur when enabling CloudFlare on PHP-enabled web sites (like WordPress or vBulletin installations). Once enabled, your access logs will show the correct IP addresses and even PHP's $_SERVER['​REMOTE_ADDR'​] variable will contain your visitors'​ real IP addresses instead of a CloudFlare IP address. This will resolve most problems that might occur when enabling CloudFlare on PHP-enabled web sites (like WordPress or vBulletin installations).
  
-Please ​also refer to the CloudFlare ​documentation[[ https://​support.cloudflare.com/​hc/​en-us/​articles/​200170676-How-do-I-restore-original-visitor-IP-with-a-LiteSpeed-server-|here]] +Please ​be aware that only access log shows real visitor IPs, but error log still shows IPs of CloudFlare ​nodeWe may improve the logging ​little to error_log to include real IPs for a future release. ​
  
  • Admin
  • Last modified: 2021/11/11 16:28
  • by Lisa Clarke