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 188.8.131.52/20 184.108.40.206/22 220.127.116.11/22 18.104.22.168/22 22.214.171.124/18 126.96.36.199/18 188.8.131.52/20 184.108.40.206/20 220.127.116.11/22 18.104.22.168/17 22.214.171.124/15 126.96.36.199/12 188.8.131.52/13 184.108.40.206/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?