Error 522 witn Nginx & Fail2ban after removing all request limit adding ignoreip on fail2ban and checking cloudflare IPs aren’t banned
The servers are on Digitalocean
I use Nginx and Fail2ban
Cloudflare was running correctly during 24h but one day I got a peak of visits and I started to got error 522.
I paused cloudflare and trying to solve the problem.
- I added ignoreips on jail.conf
ignoreip = 127.0.0.1/8 220.127.116.11/20 18.104.22.168/22 22.214.171.124/22 126.96.36.199/22 188.8.131.52/18 184.108.40.206/18 220.127.116.11/20 18.104.22.168/20 22.214.171.124/22 126.96.36.199/17 188.8.131.52/15 184.108.40.206/12 220.127.116.11/13 18.104.22.168/22
- I removed all request limit on nginx.conf and domain configuration file
#limit_req_zone $binary_remote_addr zone=reqlimit:10m rate=5r/s;
#limit_conn_zone $binary_remote_addr zone=connlimit:100m;
#limit_conn servers 1000;
#Rate Limiting #limit_req zone=reqlimit burst=20 nodelay; #limit_req_status 460; # Status to send #Connections Limiting #limit_conn connlimit 20; # Number of downloads per IP #Bandwidth Limiting #limit_rate 4096k; # Speed limit (here is on kb/s)
I checked that cloudflare IPs aren’t on iptables list
Restarted nginx and fail2ban
But, as soon as I reactivated cloudflare I got again error 522.
Any idea about what can I do for avoid 522?
Is there a way to test the connection between cloudflare and the web server without activate Cloudflare?