Sucuri Firewall Throw 502 error for some users


I have created a droplet in DigitalOcean Ubuntu and setup wordpress site. For security, we’re using sucuri firewall and some of users getting blocked with 502 error. I connected with Sucuri support team and they are saying Hosting is blocking provider is blocking the firewall IP that’s why users are getting this error.

I’ve already added sucuri’s firewall ips in the .htaccess file.

Can you guys please help me to resolve this issue. Why only random users are blocking? I tried to access from multiple locations using VPN and working fine for me.

Here are the logs from the Sucuri. I would like to know what is the root cause issue and how can I fix this permanently.

FYI: I’m a beginner in this field. Thanks in advance :)



Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello, @Hemal

Usually the 502 errors when using Sucuri’s services are related to the fact that their IP ranges are not whitelisted on the server. May I ask if you have UFW enabled on the droplet or if you’re using any other Firewall protection like some custom WordPress plugins and etc?

What you can do is to make sure their ranges are whitelisted on the droplet’s firewall configuration. In order to check if UFW is enabled/active you can run this command:

sudo ufw status

If the output is Status: inactive then UFW is currently not running on your droplet.

If UFW is running you want to make sure that Sucuri’s IP ranges are allowed on your droplet you can run the following command:

sudo ufw allow from IPrange to any port 80 sudo ufw allow from IPrange to any port 443

Note: Replace IPrange with the actual IP range of Sucuri which you can find using this link Under 502 Errors

Let me know how it goes.

Regards, Alex