Linux 客户端与 VPN Azure 的连接放弃

Linux 客户端与 VPN Azure 的连接放弃

我正在尝试从 Linux 连接到 Azure 中的 VPN。

我可以在 Windows 客户端中连接,并尝试在 Linux 中设置客户端

我按照本教程但是我无法建立连接,当我尝试建立连接时服务器没有响应。

ipsec up my_azurevpn
retransmit 5 of request with message ID 0
sending packet: from 192.168.0.7[500] to 1.2.3.4[500] (1128 bytes)
giving up after 5 retransmits
peer not responding, trying again (2/3)
initiating IKE_SA azure_fudea[2] to 1.2.3.4
generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) N(FRAG_SUP) N(HASH_ALG) N(REDIR_SUP) ]
sending packet: from 192.168.0.7[500] to 1.2.3.4[500] (1128 bytes)
retransmit 1 of request with message ID 0
sending packet: from 192.168.0.7[500] to 1.2.3.4[500] (1128 bytes)
retransmit 2 of request with message ID 0
sending packet: from 192.168.0.7[500] to 1.2.3.4[500] (1128 bytes)
retransmit 3 of request with message ID 0
sending packet: from 192.168.0.7[500] to 1.2.3.4[500] (1128 bytes)
retransmit 4 of request with message ID 0
sending packet: from 192.168.0.7[500] to 1.2.3.4[500] (1128 bytes)
retransmit 5 of request with message ID 0
sending packet: from 192.168.0.7[500] to 1.2.3.4[500] (1128 bytes)

我的 ipsec.conf 文件是:

conn my_azurevpn
      keyexchange=ikev2
      type=tunnel
      leftfirewall=yes
      left=%any
      leftauth=eap-tls
      leftid=%client # use the DNS alternative name prefixed with the %
      right=mygatewayid.vpn.azure.com
      rightid=%mygatewayid.vpn.azure.com
      rightsubnet=0.0.0.0/0
      leftsourceip=%config
      auto=add

答案1

我有同样的问题。但我猜是因为教程不够详细。我有一个 Azure 虚拟网络网关基本版,根据这个 (https://learn.microsoft.com/en-us/azure/vpn-gateway/point-to-site-about) 仅支持 SSTP 连接。SSTP 的配置不起作用(可能是因为 network-manager-sstp 客户端),但您提供的链接中的教程适用于 IKEv2 连接,它们是 /etc/NetworkManager/system-connections 中的 nmconnection 文件

相关内容