403 Forbidden when using haproxy

Does anyone have any idea why I would get this error from Cloudflare.

< HTTP/1.1 403 Forbidden
< Server: Cloudflare
< Date: Tue, 15 May 2018 01:56:27 GMT
< Content-Type: text/html
< Content-Length: 167
< CF-RAY: 41b1fcf90e949699-SJC
<
<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>Cloudflare</center>
</body>
</html>

This only happens when we use a proxy ie in this case we’re using haproxy as the gateway to the domain. If I remove haproxy everything works fine and we can get past the Cloudflare gateway and access the origin server.

Turned out it was related to SNI ie the proxy needs to make sure SNI is set or it fails.

2 Likes

This topic was automatically closed after 14 days. New replies are no longer allowed.