Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
litespeed_wiki:config:show-real-ip-behind-cloudflare [2021/11/10 20:30] Jackson Zhang |
litespeed_wiki:config:show-real-ip-behind-cloudflare [2021/11/11 16:28] Lisa Clarke Copyediting |
||
---|---|---|---|
Line 7: | Line 7: | ||
{{ :litespeed_wiki:config:cloudflare-visitor-ip.png?nolink&500 |}} | {{ :litespeed_wiki:config:cloudflare-visitor-ip.png?nolink&500 |}} | ||
- | The following snapshot shows how to add CloudFlare to the trusted list manually. However, starting from 5.4.9, CloudFlare IPs will be automatically added as trusted IPs though they won't show from LiteSpeed ACL allowed configuration at all. If you have any need to add CloudFlare IPs or other proxy/CDN IPs manually, please refer to [[litespeed_wiki:config:cloudflare-ips-or-subnets|this wiki]] for detailed instructions. | + | As of LSWS v5.4.9, CloudFlare IPs are automatically treated as trusted IPs, though they are not explicitly listed in the LiteSpeed ACL allowed configuration. |
+ | |||
+ | If, for some reason, you have a need to manually add CloudFlare IPs or other proxy/CDN IPs manually, the following shows how to do it. Please also refer to [[litespeed_wiki:config:cloudflare-ips-or-subnets|this wiki]] for detailed instructions. | ||
{{ :litespeed_wiki:config:cloudflare-unblock.png?nolink&850 |}} | {{ :litespeed_wiki:config:cloudflare-unblock.png?nolink&850 |}} | ||
Line 16: | Line 18: | ||
ALL, 103.21.244.0/22T, 103.22.200.0/22T, 103.31.4.0/22T, 104.16.0.0/13T, 104.24.0.0/14T, 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 | ALL, 103.21.244.0/22T, 103.22.200.0/22T, 103.31.4.0/22T, 104.16.0.0/13T, 104.24.0.0/14T, 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 | ||
- | If there is another layer of proxy setup in front of LiteSpeed Web Server on the same server box (i.e. 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 (i.e. CloudFlare Railgun, Nginx, or Varnish), you also need to add that server IP to the trusted list. QUIC.Cloud IPs and localhost should be automatically treated as Trusted IP already without any extra manual configuration. |
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). |