Error 522 can not fix

What is the name of the domain?

tungsmarthome.com

What is the error number?

error 522

What is the issue you’re encountering

I currently use domain buy from Cloudflare for my Home server. It’s controlled in Cloudflare dashboard and works normally for few years. 3 days ago, i got 522 error when try to login my server by domain name. However, i can access my server normally when using “http://my_public_ip : dst_port”. I tried many ways but till now nothing is fix.

One more thing, from my firewall i don’t see any Cloudflare IP access to public IP of my Home server.

May I ask what’s the destination port?
Is it the one which is supported and compatible with Cloudflare proxy :orange: from the list below?:

Are you trying to access via HTTP or HTTPS?

May I ask what SSL option have you got selected under the SSL/TLS tab at Cloudflare dashboard for your domain ( Flexible, Full, Full Strict … )? :thinking:

Before moving to Cloudflare, was your Website working over HTTPS connection?

May I ask what troubleshooting steps have you tried already related to the 522 timeout error?

Thank you for you support.
So:

  1. This port is different from those ports supported by Cloudflare.
  2. I’m using Flex for SSL/TLS
  3. Without Cloudflare, I don’t have https connection.
  4. In DNS record, when I switch from Proxy to DNS only, I can access my server through “http://domain_name:http ports list of Cloudflare” (by NAT rule to local IP: port of server)
    Therefore, I change DNS record to Proxy then create another NAT rule which:
  • Source list: IP range of Cloudflare
  • Dst_port: Cloudflare https ports list
    Now I got 525 error.
    Thanks.

Unfortunately, that’s one of the reasons why the proxy :orange: doesn’t work.

Can you change it or not?

If not, I’d suggest you to use Cloudflared tunnel instead as follows, once created and running, add your domain name to the public hostnames and make sure you set https with noTLSVerify option enabled.

Has to be fixed, and you should either generate and install the Cloudflare Origin CA Certificate and use Full (strict) SSL/TLS mode:

Hopefully you’re able to pass through your ISP and your ISP allows these ports? :thinking:

Thank you for your support.
I’m checking your all solutions then will try later.
Besides, I’m thinking about other way:

  • Full (Strict) for SSL/TLS
  • Page rule: turn off SSL, URL is my domain
    I tried and it works already but I’m not sure about pros and cons of this solution (vulnerability, etc).
    Could you evaluate my solution ?

Thanks

You should either use HTTPS or keep HTTP. This is the choice of the website owner.
There are advantages and it’s recommended to use HTTPS, having an SSL certificate at your origin web host installed. For website visitors, it’s much more natural to have HTTPS nowadays, both for security, privacy and data being sent/received.

Thank you for your reply.
I found when apply my solution, I have to use https and I can not access my origin server with http. So it means Cloudflare still handle it with SSL ?

Thank you for feedback.

In such case when you don’t have an SSL at origin, Cloudflare is able and providing HTTPS (SSL) for the end-visitors as well as having a solution with Cloudflare Origin CA Certificate to have end-to-end encryption.
Sometimes, we’re limited with configurations at our service providers, therefrom have to test out which kind of solution works best for our case to remove any remaning issues and keep the website or application working fine.

Could be either for some reason, host doesn’t allow you to install custom SSL certificate, or you have to pay for such, or sometimes we lack of knowledge.
Otherwise, some configuration error and possible server isn’t working nor responding to the desired port connection, or firewall is blocking, and then Cloudflare cannot connect at the end.

There are multiple ways of encryption with Cloudflare, and we should pick the one which best suits our case and our website visitors.

To short answer your question, Cloudflare can and will serve HTTPS even if you don’t have HTTPS at your origin (despite it’s not recommended way due to other issues which could arise in the meantime).

Thank you for your explanation.
If this solution does not work, I will switch to Cloudflare Tunnel :slight_smile:

1 Like

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