IPSec over L2TP:预共享密钥的密钥派生失败

IPSec over L2TP:预共享密钥的密钥派生失败

在使用 ~Ubunutu (GalliumOS)、Strongswan 和 NetworkManager 之前,我设置了一个到我的 Uni 的 VPN(使用基于 L2TP 的 IPSec),但是这次我不断收到有关我的 PSK 的错误,请参阅以下日志输出:

Jun 22 11:01:44 charon[6145]: sending packet: from 192.168.1.65[500] to 141.2.54.193[500] (244 bytes)
Jun 22 11:01:44 charon[6145]: received packet: from 141.2.54.193[500] to 192.168.1.65[500] (260 bytes)
Jun 22 11:01:44 charon[6145]: parsed ID_PROT response 0 [ KE No NAT-D NAT-D ]
Jun 22 11:01:44 charon[6145]: key derivation for pre-shared key failed
Jun 22 11:01:44 charon[6145]: generating INFORMATIONAL_V1 request 522813457 [ N(INVAL_KE) ]
Jun 22 11:01:44 charon[6145]: sending packet: from 192.168.1.65[500] to 141.2.54.193[500] (56 bytes)
Jun 22 11:01:44 charon[6145]: establishing connection '358cedab-07d4-49ed-9851-b622f8770710' failed
Jun 22 11:01:44 charon[6145]: Stopping strongSwan IPsec...

我确信我使用的预共享密钥没问题。我记得上次的问题与密码有关。我因此运行了来自 network-manager-l2tp 的“已知问题”站点的 ike-scan 脚本并得到以下输出:

SA=(Enc=3DES Hash=SHA1 Group=2:modp1024 Auth=PSK LifeType=Seconds LifeDuration(4)=0x00007080)
SA=(Enc=AES KeyLength=128 Hash=SHA1 Group=19 Auth=PSK LifeType=Seconds LifeDuration(4)=0x00007080)
SA=(Enc=AES KeyLength=256 Hash=SHA1 Group=20 Auth=PSK LifeType=Seconds LifeDuration(4)=0x00007080)

据此,我指定:

  • 第一阶段算法:3des-sha1-modp1024
  • 第 2 阶段算法:3des-sha1

我相信问题一定出在此处,非常感谢任何建议! (我运行的是 Ubuntu、GalliumOS 2.1、16.04、xenial,但工作时是一样的)

相关内容