522 Error - Connection Timeout on Google Cloud Hosting

After transferring my domain name to Cloudflare (free plan), I have been getting 522 Error Connection Timeout on my domain name https://kurtisadigba.com/

The solutions provided suggested that I whitelist Cloudflare’s IP addresses on my hosting platform. Unfortunately, I’m using the Google Cloud Platform Hosting service meaning, I’m my own customer service technician.

Does anyone know how to whitelist IPs in Google Cloud? I have checked online and YT but nothing related to this issue comes up. Or any other methods you know I can use to get my site up again on Google Cloud hosting? After 60 days, I’ll move out of Cloudflare domain registrar to avoid this problem in future.

Thank you already.

Could you try pausing your site on Cloudflare and checking whether that fixes the issue?

If the issue is still there, then it’s not caused by Cloudflare and moving the domain to GCP would likely not fix it.

If the issue is fixed, try asking for help on the GCP forums. Also, you could keep your domain on Cloudflare Registrar but disable proxying :grey: or “pause the site on Cloudflare”. It will of course disable Cloudflare’s DDoS protection and caching, but so would moving the domain to Google.

1 Like

May I ask have you checked the suggestions from the below article?:

https://support.cloudflare.com/hc/en-us/articles/115003011431-Troubleshooting-Cloudflare-5XX-errors#522error

GCP has got Firewall rules (VPC) as far as I used them → Google Cloud Platform.

You can set it there and even at the Virtual Machine itself.

Helpful articles:

https://support.cloudflare.com/hc/en-us/articles/201897700-Allowing-Cloudflare-IP-addresses

There was a link to an helpful article provided by @judge, but seems it’s not working anymore:

2 Likes

you failed to mention that google does not allow IPV 6 yet on the firewall editing side :slight_smile:

Whitelisting on google cloud would be great but won’t work that well. NOT CLOUDFLARE’S FAULT! It has frustrated me a little bit, and I need to do it on the VM side.

Do you have control over the back end? What distro did you put on it? And more importantly, apache, Nginx, or openlitespeed?

p.s, I host my sites on google cloud also.

1 Like

How so?

Haven’t tried before, but seems I can enter IPv6 ranges:

Even if not via GUI, maybe it could be possible to add them via gcloud CLI I think. Will try out.

Nevertheless, the OP can enter IPv4 ranges at least as far as the VM would use it too, and even DNS records I assume would also be pointed to an IPv4 (not needed IPv6 in this particular case if so).

VPC firewall rules also supports IPv6 now: VPC firewall rules overview  |  Google Cloud

Firewall rules support IPv4 connections. IPv6 connections are also supported in VPC networks that have IPv6 enabled. When specifying a source for an ingress rule or a destination for an egress rule by address, you can specify IPv4 or IPv6 addresses or blocks in CIDR notation.

Each firewall rule can contain either IPv4 or IPv6 ranges, but not both.

1 Like

Interesting, I tried creating + editing for IPV 6 and it said unavailable.

Thanks for posting this, maybe I need to raise a ticket. I thought I read somewhere IPV6 wasn’t available either, so this is indeed interesting. I literally just tried again after you posted.

Very interesting…

2 Likes

Thank you everyone for your input and suggested solutions. I checked the site and everything is working fine now.

I didn’t do anything, it just started working. I have no idea what happened or what changed.

Thanks again everyone, I appreciate you all.

<3.

1 Like

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