Hello,
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 :)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.