2023年6月27日 星期二

Get Public IP Address from OpenDNS

一般取得所在 Public IP 都是用 Web 服務取得,例如:
curl ip4.tw
curl ifconfig.co

OpenDNS 有提供一個服務,對他們的 name server 查 myip.opendns.com 會回應來源 IP
dig +short myip.opendns.com @resolver1.opendns.com
host myip.opendns.com resolver1.opendns.com

發現若環境同時有 IPv4+IPv6 可能會不正常,因為兩個 IP 都有的話,通常會走 IPv6 的路由,用 IPv6 路由去查 A 記錄導致無資料

保險一點,指令要區分 IPv4、IPv6
dig -4 +short A myip.opendns.com @resolver1.opendns.com
dig -6 +short AAAA myip.opendns.com @resolver1.opendns.com

2023年6月18日 星期日

Import Rocky Linux 9 to WSL

需先安裝 XZ Utils for Windows 把 xz.exe 放在 PATH 有指到的地方

curl -LOs https://github.com/rocky-linux/sig-cloud-instance-images/raw/Rocky-9.2.20230513-Base-x86_64/layer.tar.xz
上面的 layer.tar.xz 是官方的網址,其他版本網址可到 sig-cloud-instance-images 選擇 Branch
xz -d layer.tar.xz
wsl --import RockyLinux9 D:\WSL\RockyLinux9 layer.tar
Distro 名稱 RockyLinux9 及資料目錄名稱 D:\WSL\RockyLinux9 請依自身環境調整
wsl -d RockyLinux9
即完成進入 RockyLinux9 WSL

ref. Import any Linux distribution to use with WSL

Update ESXi to 8.0.3d using depot file

本例是從 8.0U3 升到 8.0U3d,若從更舊的版本升級,不確定是否適用 先把所有 VM 關機,進入維護模式 把 depot 升級檔 VMware-ESXi-8.0U3d-24585383-depot.zip 放到機器內 ssh ESXi 先查看 depot 有那些 Prof...