In today's digital age, website security and efficiency are more crucial than ever, especially for sites that handle online payments. This is where solutions like Cloudflare and Redsys come into play. Cloudflare protects and speeds up your website, Redsys provides a payment system that is secure and reliable. However, the interaction between these two platforms can be delicate. Sometimes, Cloudflare's security measures can inadvertently block legitimate services like Redsys, which can affect transactions on your website and, consequently, your business.
This article will briefly explain how to configure Cloudflare to recognize Redsys and allow it to operate smoothly on your website.
Create a rule for Redsys in Cloudflare
Log in to your Cloudflare account and, in the menu, in the "Seguridad" section, click "WAF":
Once in the WAF section, click "Crear regla" on the "Reglas personalizadas" tab:
Next, add a name to the rule and, under "Campo", select "Núm AS". Then, for the operator, select "es igual a" and, under "Valor", enter "31627" (this is Redsys's AS). It should look like this:
Also add another Redsys AS by clicking "o" and using Valor "3352":
Finally, under "Elegir acción", select "Omitir" and select all the checkboxes, also remembering to select all those under "Más componentes que omitir":
Once everything is done, simply click "Implementar" to apply the rule immediately. With this rule, Redsys will not be blocked by Cloudflare's WAF, and you can ensure that your customers' transactions are processed smoothly and securely.
Other services
SeQura uses 3 static IPs for both sandbox and production environments, from which a request may originate. Add the following addresses to the rule:
- 34.253.159.179
- 34.252.147.155
- 52.211.243.177
PayPal uses ASN 17012 to make requests related to its payment services. To properly allow incoming calls from its systems (for example, for IPN notifications or payment validations), you can configure the WAF to allow all traffic from that ASN. If your system supports it, you can also create custom rules that validate the User-Agent header or the DNS origin of requests to api.paypal.com.
If you use other payment providers, remember to check their official documentation for the IPs or ASN ranges that need to be allowed.
We hope this tutorial has been helpful. If you have any questions about this or any other issue related to your servers on Clouding, feel free to contact soporte@clouding.io We're here to help!