Search code examples
google-cloud-platformgoogle-compute-engine

in-browser SSH - IP address range


One of the options to ssh into the instance is in-browser ssh. It only works if I allow SSH from 0.0.0.0/0 IP range.

Is there a way to get the range of specific IP address range(s) from where GCP will establish in-browser SSH?

P.S.: I am not talking about SSH from my laptop. I am talking about in-browser SSH.


Solution

  • I also wanted to restrict SSH access to in-browser only and found this

    The client IP address in the SSH connection will be part of the range 35.235.240.0/20. This range is the pool of IP addresses used by IAP to proxy the connection from your browser to your instance. So, you can create a more restrictive VPC firewall rule allowing SSH connections only from this IP address range. As a result, only users allowed by IAP will be able to connect to VM using SSH.

    (from https://cloud.google.com/community/tutorials/ssh-via-iap)