Hi,
I run several WordPress web sites on OpenLiteSpeed 1.7.18 on CyberPanel 2.3 on an Azure virtual machine. It was working fine until I recently switched to Cloudflare for DNS and CDN caching. Since then, after loading a few web pages (or sometimes right away when loading the WordPress back end), Cloudflare returns Error code 520.
I found https://docs.litespeedtech.com/lsws/cp/cpanel/cloudflare/ which says Cloudflare is trusted automatically, but maybe that is only Enterprise Lightspeed, so I added this to Server Configuration > Security > Access Control:
ALL, 173.245.48.0/20T, 103.21.244.0/22T, 103.22.200.0/22T, 103.31.4.0/22T, 141.101.64.0/18T, 108.162.192.0/18T, 190.93.240.0/20T, 188.114.96.0/20T, 197.234.240.0/22T, 198.41.128.0/17T, 162.158.0.0/15T, 104.16.0.0/13T, 104.24.0.0/14T, 172.64.0.0/13T, 131.0.72.0/22T
I also set Configuration > General Settings > Use Client IP in Header to Trusted IP Only.
I thought this probably has something to do with OLS Anti-DDoS but increasing those limits doesn't help. And it shouldn't matter since the Cloudflare IPs are trusted. Then today I found this in the error log:
2023-12-26 22:46:43.164082 [NOTICE] [1290834] [166.216.158.18] reached per client soft connection limit: 20 for 49 seconds, close connection!
2023-12-26 22:46:43.164112 [WARN] [1290834] [166.216.158.18] bot detected for vhost [N/A], reason: OverConnSoftLimit, close connection!
2023-12-26 22:46:43.164119 [INFO] [1290834] [172.71.159.23:59872] Client IP from header: 166.216.158.18, cur conns: 1, access denied
2023-12-26 22:46:43.561406 [INFO] [1290834] [172.71.155.29:44858] Client IP from header: 166.216.158.18, cur conns: 2, access denied
166.216.158.18 is an IP address from my cell phone provider (currently tethered to my laptop). It is the IP address in the header (see third and fourth messages above). But it looks like this header IP, rather than the Cloudflare IP, is being used for connection limiting (see first message).
Shouldn't OLS allow the connection through Cloudflare, even if Cloudflare asks for a lot of connections at once?
How should I run OLS behind Cloudflare? Should I disable OLS throttling (set to 0?) and just let Cloudflare manage DDoS?
I run several WordPress web sites on OpenLiteSpeed 1.7.18 on CyberPanel 2.3 on an Azure virtual machine. It was working fine until I recently switched to Cloudflare for DNS and CDN caching. Since then, after loading a few web pages (or sometimes right away when loading the WordPress back end), Cloudflare returns Error code 520.
I found https://docs.litespeedtech.com/lsws/cp/cpanel/cloudflare/ which says Cloudflare is trusted automatically, but maybe that is only Enterprise Lightspeed, so I added this to Server Configuration > Security > Access Control:
ALL, 173.245.48.0/20T, 103.21.244.0/22T, 103.22.200.0/22T, 103.31.4.0/22T, 141.101.64.0/18T, 108.162.192.0/18T, 190.93.240.0/20T, 188.114.96.0/20T, 197.234.240.0/22T, 198.41.128.0/17T, 162.158.0.0/15T, 104.16.0.0/13T, 104.24.0.0/14T, 172.64.0.0/13T, 131.0.72.0/22T
I also set Configuration > General Settings > Use Client IP in Header to Trusted IP Only.
I thought this probably has something to do with OLS Anti-DDoS but increasing those limits doesn't help. And it shouldn't matter since the Cloudflare IPs are trusted. Then today I found this in the error log:
2023-12-26 22:46:43.164082 [NOTICE] [1290834] [166.216.158.18] reached per client soft connection limit: 20 for 49 seconds, close connection!
2023-12-26 22:46:43.164112 [WARN] [1290834] [166.216.158.18] bot detected for vhost [N/A], reason: OverConnSoftLimit, close connection!
2023-12-26 22:46:43.164119 [INFO] [1290834] [172.71.159.23:59872] Client IP from header: 166.216.158.18, cur conns: 1, access denied
2023-12-26 22:46:43.561406 [INFO] [1290834] [172.71.155.29:44858] Client IP from header: 166.216.158.18, cur conns: 2, access denied
166.216.158.18 is an IP address from my cell phone provider (currently tethered to my laptop). It is the IP address in the header (see third and fourth messages above). But it looks like this header IP, rather than the Cloudflare IP, is being used for connection limiting (see first message).
Shouldn't OLS allow the connection through Cloudflare, even if Cloudflare asks for a lot of connections at once?
How should I run OLS behind Cloudflare? Should I disable OLS throttling (set to 0?) and just let Cloudflare manage DDoS?