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

沒有留言:

Chrome / Edge 修正個人裝置有受管理瀏覽器的問題

個人電腦 Chrome/Edge 出現瀏覽器受管,通常是曾經登入過公司或學校帳戶造成 以下兩個方式進行排除 1. 刪除 registry 中的 Chrome / Edge Policies (需用管理者權限) reg delete "HKEY_LOCAL_MACHINE...