Vpn

VPN 網關不產生流量

  • July 21, 2017

我安裝了一個 VPN 網關,以使用 IPsec 與其他使用 Internet 的 VM 連接。在我的情況下,我在另一邊使用 Debian,並且似乎如何使用 strongswan 進行連接。令我驚訝的是查看流量日誌,因為 azure 端沒有流量數據。在另一邊檢查日誌只出現這個:

Jul 19 16:47:16 vpnserver2 charon: 01[ENC] generating INFORMATIONAL response 1000 [ ]
Jul 19 16:47:16 vpnserver2 charon: 01[NET] sending packet: from MypublicIPA[4500] to MypublicIPB[4500] (80 bytes)
Jul 19 16:47:18 vpnserver2 charon: 14[NET] received packet: from MypublicIPB[4500] to MypublicIPA[4500] (80 bytes)
Jul 19 16:47:18 vpnserver2 charon: 14[ENC] parsed INFORMATIONAL request 1001 [ ]
Jul 19 16:47:18 vpnserver2 charon: 14[ENC] generating INFORMATIONAL response 1001 [ ]
Jul 19 16:47:18 vpnserver2 charon: 14[NET] sending packet: from MypublicIPA[4500] to MypublicIPB[4500] (80 bytes)
Jul 19 16:47:20 vpnserver2 charon: 13[NET] received packet: from MypublicIPB[4500] to MypublicIPA[4500] (80 bytes)
Jul 19 16:47:20 vpnserver2 charon: 13[ENC] parsed INFORMATIONAL request 1002 [ ]
Jul 19 16:47:20 vpnserver2 charon: 13[ENC] generating INFORMATIONAL response 1002 [ ]
Jul 19 16:47:20 vpnserver2 charon: 13[NET] sending packet: from MypublicIPA[4500] to MypublicIPB[4500] (80 bytes)
Jul 19 16:47:22 vpnserver2 charon: 15[NET] received packet: from MypublicIPB[4500] to MypublicIPA[4500] (80 bytes)
Jul 19 16:47:22 vpnserver2 charon: 15[ENC] parsed INFORMATIONAL request 1003 [ ]
Jul 19 16:47:22 vpnserver2 charon: 15[ENC] generating INFORMATIONAL response 1003 [ ]
Jul 19 16:47:22 vpnserver2 charon: 15[NET] sending packet: from MypublicIPA[4500] to MypublicIPB[4500] (80 bytes)
Jul 19 16:47:24 vpnserver2 charon: 05[NET] received packet: from MypublicIPB[4500] to MypublicIPA[4500] (80 bytes)
Jul 19 16:47:24 vpnserver2 charon: 05[ENC] parsed INFORMATIONAL request 1004 [ ]
Jul 19 16:47:24 vpnserver2 charon: 05[ENC] generating INFORMATIONAL response 1004 [ ]
Jul 19 16:47:24 vpnserver2 charon: 05[NET] sending packet: from MypublicIPA[4500] to MypublicIPB[4500] (80 bytes)
Jul 19 16:47:26 vpnserver2 charon: 16[NET] received packet: from MypublicIPB[4500] to MypublicIPA[4500] (80 bytes)
Jul 19 16:47:26 vpnserver2 charon: 16[ENC] parsed INFORMATIONAL request 1005 [ ]
Jul 19 16:47:26 vpnserver2 charon: 16[ENC] generating INFORMATIONAL response 1005 [ ]
Jul 19 16:47:26 vpnserver2 charon: 16[NET] sending packet: from MypublicIPA[4500] to MypublicIPB[4500] (80 bytes)
Jul 19 16:47:28 vpnserver2 charon: 11[NET] received packet: from MypublicIPB[4500] to MypublicIPA[4500] (80 bytes)
Jul 19 16:47:28 vpnserver2 charon: 11[ENC] parsed INFORMATIONAL request 1006 [ ]
Jul 19 16:47:28 vpnserver2 charon: 11[ENC] generating INFORMATIONAL response 1006 [ ]
Jul 19 16:47:28 vpnserver2 charon: 11[NET] sending packet: from MypublicIPA[4500] to MypublicIPB[4500] (80 bytes)
Jul 19 16:47:30 vpnserver2 charon: 06[NET] received packet: from MypublicIPB[4500] to MypublicIPA[4500] (80 bytes)
Jul 19 16:47:30 vpnserver2 charon: 06[ENC] parsed INFORMATIONAL request 1007 [ ]
Jul 19 16:47:30 vpnserver2 charon: 06[ENC] generating INFORMATIONAL response 1007 [ ]
Jul 19 16:47:30 vpnserver2 charon: 06[NET] sending packet: from MypublicIPA[4500] to MypublicIPB[4500] (80 bytes)
Jul 19 16:47:32 vpnserver2 charon: 03[NET] received packet: from MypublicIPB[4500] to MypublicIPA[4500] (80 bytes)

我不知道是否需要創建路由表以連接 vpn 網關和 azure 內的其他網路,但我預計會生成有關連接的流量,但似乎沒有真正連接。

檢查日誌也顯示為空,所以我不知道在哪裡檢查是否出現故障。

建議?

檢查日誌也顯示為空,所以我不知道在哪裡檢查是否出現故障。

您可以使用 Network Watcher 查看 VPN 日誌,請參考此連結

我有 4 個 GR 和他們的 vnet。Guide 說要使用新的 GR 和 vnet,所以現在我需要將此 vnet 連接到其餘部分。

目前,這是不可能的。VPN 流量不能在兩個 VNet 之間具有傳遞關係。這意味著您需要創建兩個從本地到 Azure 中的兩個 VNet 的站點到站點 VPN。UDR 和對等互連在這種情況下也不起作用。請參考這個答案

引用自:https://serverfault.com/questions/863070