Azure 與 AWS 之間建立VPN連線 === ###### tags: `AZURE` 關於高可用性,請注意在 AWS 上,默認情況下 VPN 連接始終有 2 個Public IP,每個Tunnel一個。在 Azure 上,默認情況下不會發生這種情況,在這種情況下,您將使用 Azure 端的Active/Passivity。 這意味著我們將只設置一個來自 Azure VPN Gateway的“node”來與 AWS 建立兩個 VPN 連接。如果出現故障,Azure VPN Gateway的第二個node將以Active/Passivity模式連接到 AWS。 ## Azure環境建置 1.建立資源群組  2.建立Virtual Network  Lab環境的CIDR為:10.0.0.0/16,subnet設置為:10.0.1.0/24   3.建立VPN Gateway VPN Gateway建立的VM是無法訪問的,並且會關連到特定的subnet和特定的資源,因此建議使用/27的CIDR,先至資源群組進行建立。   點選檢閱+建立後等待幾分鐘即建立完成 ## AWS環境建置 1.建立VPC   2.在VPC新增subnet   3.在AWS上建立一個Customer gateway並指向Azure vpn gateway public ip 預設ASN是65000,使用預設即可   4.創建Virtual Private Gateway並attach給VPC    5.建立site to site vpn 連線  靜態IP的CIDR設置Azure subnet CIDR  6.下載VPN組態 Azure不是一個選項,因此廠商和平台需要選取通用  可以看到組態中有Pre-Shared Key和Virtual Private Gateway的IP   也可以在console上看到VPN的相關資訊  ## 在 Azure 配置上添加 AWS VPN設置 1.建立Local Network Gateway  2.建立Virtual Private Gateway的連線  等待建立完成後,可以觀察到Azure這邊已經建立連線  AWS端也可以看到第一條通道已經UP  現在編輯與VPC關聯的route table  添加Azure網段到subnet到route table  3.為了增加高可用性,因此把另一條Tunnel也建立起來  建立第二條Tunnel的連接  可以看到第二條Tunnel也都建立成功   4.建立Azure和AWS的VM來測試一下 測試前必須先建立Internet gateway,但對於VPN來說這並不是必需的,為了Internet Public IP測試,因此我們進行建立  附加到VPC上  新增一個0.0.0.0/0到Internet 的Route Table  在Azure上route table會自動創建  Azure vm ping test  AWS vm ping test  AWS vm 只有 Private IP 進行 Ping test測試也成功 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up