2023年1月6日 星期五

Detect if a VM is running in Google Compute Engine

Detect if a VM is running in Compute Engine

sudo dmidecode -s system-product-name | grep "Google Compute Engine"
這個需要 root 權限,實際上是去讀取 /sys/firmware/dmi/tables/DMI
用 strings /sys/firmware/dmi/tables/DMI | grep "Google Compute Engine" 也行

若程式沒有 root 權限,可以去讀取 /etc/hosts 有沒有包含 Added by Google 字樣
grep "Added by Google" /etc/hosts

沒有留言:

RouterOS Reverse Proxy

RouterOS 從 7.22 版,新增了 Reverse Proxy 功能, SNI 填入域名 IP Address 填入 Server IP,通常是內部 IP,但也可以導到外部 Port 填入內部 Server HTTP 服務 Port Certificate 選擇對應的...