2024年8月26日 星期一

RouterOS WireGuard

RouterOS 在 7 版以後支援 WireGuard
註: WireGuard 在 Linux Kernel 5.6 版開始內建

設定滿簡單的,在選單 WireGuard New Interface,Private Key 及 Public Key 不用填,會自動產生
在 IP / Addresses 綁一個 IP 給 wireguard1,例如 10.66.66.1/24
在 IP / Firewall / NAT 加上 srcnat 讓 wireguard1 區段 masquerade

在 Peer 加 Client,這邊就沒有自動產生功能,
要找一台有裝 wireguard-tools 的 Linux,用 wg 指令產生
wg genkey | tee privatekey # 產生 Private Key
wg pubkey < privatekey # 產生 Public Key
wg genpsk # 產生 Preshared Key

Client Address 填入 10.66.66.2 # 要在上面 wireguard1 網段內
Client DNS 填入 8.8.8.8
Client Endpoint 填入 RouterOS 的 Public IP
下面會自動產生 Client Config 及 Client QR 碼

但實測在 [Interface] 內 ListenPort 必需移除才會通,
掃 QR 碼後,需將 ListenPort (監聽連接埠) 設定移除,移除後欄位會呈現 (隨機)

ref. ROS WireGuard

沒有留言:

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...