Category Archives: GCP

Google Compute Engine (GCE) 加入防火牆設定後透過瀏覽器建立 SSH 連線失敗 – Clarence 的科技學習實戰筆記

_netblocks.google.com text = “v=spf1 ip4:35.190.247.0/24 ip4:64.233.160.0/19 ip4:66.102.0.0/20 ip4:66.249.80.0/20 ip4:72.14.192.0/18 ip4:74.125.0.0/16 ip4:108.177.8.0/21 ip4:173.194.0.0/16 ip4:209.85.128.0/17 ip4:216.58.192.0/19 ip4:216.239.32.0/19 ~all”

_netblocks2.google.com text = “v=spf1 ip6:2001:4860:4000::/36 ip6:2404:6800:4000::/36 ip6:2607:f8b0:4000::/36 ip6:2800:3f0:4000::/36 ip6:2a00:1450:4000::/36 ip6:2c0f:fb50:4000::/36 ~all”

_netblocks3.google.com text = “v=spf1 ip4:172.217.0.0/19 ip4:172.217.32.0/20 ip4:172.217.128.0/19 ip4:172.217.160.0/20 ip4:172.217.192.0/19 ip4:172.253.56.0/21 ip4:172.253.112.0/20 ip4:108.177.96.0/19 ip4:35.191.0.0/16 ip4:130.211.0.0/22 ~all”

 

Source: Google Compute Engine (GCE) 加入防火牆設定後透過瀏覽器建立 SSH 連線失敗 – Clarence 的科技學習實戰筆記

無法透過 Cloud Identity-Aware Proxy 連線

無法透過 Cloud Identity-Aware Proxy 連線
錯誤代碼:4003
原因:failed to connect to backend

連線至 VM 遭拒。
請確定以下事項:
VM 設有防火牆規則,允許來自 IP 範圍 35.235.240.0/20、通訊埠 22 的 TCP 輸入流量
– 目標 VM 上的 SSH Daemon 正在運作中

您可以嘗試不使用 Cloud Identity-Aware Proxy 來連線。

# 要使用瀏覽器的Cloud shell 連線,要另外開一個IP,  34.80.130.73

 

 

google cloud platform – in-browser SSH – IP address range

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.

 

How to default Python3.8 on my Mac using Homebrew?

There is no official way to turn off the Python deprecation warning that you are encountering as a result of the most recent release of the Google Cloud SDK. Instead of the outdated Python 3.5-3.7 versions, you can set up the Cloud SDK to use your current Python 3.10 installation.

python3 --version

Python 3.7.6

$ brew install python3

On macOS/Linux:
export CLOUDSDK_PYTHON=/path/to/python3.10

example :
python is /usr/bin/python
python is /usr/local/bin/python

for me :

export CLOUDSDK_PYTHON=/usr/local/bin/python3.8