Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code: 4010 - Connection via Cloud Identity-Aware Proxy Failed

I have seen a similar error on stackoverflow, but with a different code (so maybe it is not the same?). Any how I have been thrown this error spontaneously. Sometimes after 20 seconds of starting my instance (and launching SSH in browser), sometimes after 30 minutes, but it completely shuts down my instance.

Connection via Cloud Identity-Aware Proxy Failed
Code: 4010
Reason: destination read failed
You may be able to connect without using the Cloud Identity-Aware Proxy. 

If I click the "Cloud Identity-Aware Proxy" button I am getting:

Connection Failed
We are unable to connect to the VM on port 22. Learn more about possible causes of this issue.

Any idea what is happening? I havn't done any changes in my instance settings for a long time.

like image 411
Lorenz Web Avatar asked Aug 28 '26 15:08

Lorenz Web


1 Answers

The issue regarding the Identity-Aware Proxy(IAP) connection to the instance is due to the lack of a firewall rule allow-ingress-from-iap with this IP ranges 35.235.240.0/20 that needs to be configured when using IAP.

To Allow SSH access to all VM instances in your network, do the following:

1- Open the Firewall Rules page (Navigation menu > VPC network > Firewall) and click Create firewall rule

2- Configure the following settings:

  • Name: allow-ingress-from-iap
  • Direction of traffic: Ingress
  • Target: All instances in the network
  • Source filter: IP ranges
  • Source IP ranges: 35.235.240.0/20
  • Protocols and ports: Select TCP and enter 22 to allow SSH

3- Click Create

like image 170
Gerardo L. Avatar answered Aug 31 '26 06:08

Gerardo L.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!