https://www.wireguard.com
呢個post 我唔多講 WireGuard 係乜
亦都唔同其他 Tunneling/VPN 比較 (IPSec IKE v1/v2, IPSec PPTP/L2TP, OpenVPN, etc)
較學術既比較自己 Google la 要
呢到只提供教學,同埋有限度支援
Google Cloud 係要錢架,最多有free credits 用到一個月咁上下......
不過平平地玩應該可以平過快過安全過坊間既 product
首先,你需要一個 Google Compute Cloud access,我都假設你有能力開個 acc
https://console.cloud.google.com
1. 然後就起機
重點:
a. 必須係 Ubuntu 18.04,其他 system 冇試過,亦都唔好亂試
b. 必需有 wireguard network tag,用黎attach firewall rules
c. 其他野例如隻 harddisk, CPU, RAM, 豐儉由人
d. 要係 asia-east2 (Hong Kong),因為快,你無理由想 VPN 連去北美架化
2. 係等部機起既時候去起個 firewall rules
VPC Network -> Firewall Rules
重點:
a. Network Tag 一定要係 wireguard,總之你部機一定要落左一樣既 tag
b. IP ranges 一定要係 0.0.0.0/0 (即係所有 IP, 唔洗驚,呢個係用黎allow 你部手機係所有地方都上到VPN)
c. Protocols and Ports 一定要係 udp:30000-60000
3. 咁呢個時候你部機應該已經著左,可以用
去返 Compute Engine -> VM Instances
篤入去 wireguard 部機到,揀 SSH -> Open in browser window
4. 等等等,去到有得打字就去呢到:
https://github.com/anxiety-labs/alprazolam
或者直接 copy and paste:
sudo bash -c "$(curl -fsSL https://github.com/anxiety-labs/alprazolam/raw/master/wireguard/gce.sh)"
再拍 enter
如無意外,去到最後會有個 QR Code 彈出黎
5. 等緊既時候可以去 iPhone 裝 WireGuard 個 app,官方有上架,呢到唔講
之後到有 QR Code
就 scan
6. 完