[GH-ISSUE #323] 在docker 里面部署报错no suitable connection found with IKEv2 policy #301

Closed
opened 2026-03-02 08:01:12 +03:00 by kerem · 3 comments
Owner

Originally created by @justingkao on GitHub (Nov 19, 2022).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/323

问题描述
我在openwrt 系统的docker里面部署docker ikev2服务。pulic_ip 换成各种地址都是这个错误。

日志
pluto[371]: packet from 172.17.0.1:53454: ISAKMP_v2_IKE_SA_INIT message received on 172.17.0.3:500 but no suitable connection found with IKEv2 policy
pluto[371]: packet from 172.17.0.1:53454: responding to IKE_SA_INIT (34) message (Message ID 0) with unencrypted notification NO_PROPOSAL_CHOSEN

ikev2 Config

conn ikev2-cp
  left=%defaultroute
  leftcert=172.17.0.1
  leftsendcert=always
  leftsubnet=0.0.0.0/0
  leftrsasigkey=%cert
  right=%any
  rightid=%fromcert
  rightaddresspool=192.168.43.10-192.168.43.250
  rightca=%same
  rightrsasigkey=%cert
  narrowing=yes
  dpddelay=30
  retransmit-timeout=300s
  dpdaction=clear
  auto=add
  ikev2=insist
  rekey=no
  pfs=no
  ike=aes256-sha2,aes128-sha2,aes256-sha1,aes128-sha1
  phase2alg=aes_gcm-null,aes128-sha1,aes256-sha1,aes128-sha2,aes256-sha2
  ikelifetime=24h
  salifetime=24h
  encapsulation=yes
  leftid=172.17.0.1
  modecfgdns="8.8.8.8 8.8.4.4"
  mobike=yes
Originally created by @justingkao on GitHub (Nov 19, 2022). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/323 **问题描述** 我在openwrt 系统的docker里面部署docker ikev2服务。pulic_ip 换成各种地址都是这个错误。 **日志** pluto[371]: packet from 172.17.0.1:53454: ISAKMP_v2_IKE_SA_INIT message received on 172.17.0.3:500 but no suitable connection found with IKEv2 policy pluto[371]: packet from 172.17.0.1:53454: responding to IKE_SA_INIT (34) message (Message ID 0) with unencrypted notification NO_PROPOSAL_CHOSEN ikev2 Config ``` conn ikev2-cp left=%defaultroute leftcert=172.17.0.1 leftsendcert=always leftsubnet=0.0.0.0/0 leftrsasigkey=%cert right=%any rightid=%fromcert rightaddresspool=192.168.43.10-192.168.43.250 rightca=%same rightrsasigkey=%cert narrowing=yes dpddelay=30 retransmit-timeout=300s dpdaction=clear auto=add ikev2=insist rekey=no pfs=no ike=aes256-sha2,aes128-sha2,aes256-sha1,aes128-sha1 phase2alg=aes_gcm-null,aes128-sha1,aes256-sha1,aes128-sha2,aes256-sha2 ikelifetime=24h salifetime=24h encapsulation=yes leftid=172.17.0.1 modecfgdns="8.8.8.8 8.8.4.4" mobike=yes ```
kerem closed this issue 2026-03-02 08:01:12 +03:00
Author
Owner

@hwdsl2 commented on GitHub (Nov 19, 2022):

@justingkao 你好!这个错误一般是由于 IKEv2 连接未能成功加载导致的。你应该已经启用了 Libreswan 日志。首先重启容器:docker restart ipsec-vpn-server。然后查看一下日志中 Libreswan 启动时是否报错。可能有关于 IKEv2 连接不能加载的错误。

如果没有此错误的话,可能是你的容器的 IKEv2 配置的地址不正确。你的日志中的错误显示容器的 IP 为 172.17.0.3,连接请求是来自 172.17.0.1。但你的 ikev2.conf 中的 IP 是 172.17.0.1。我觉得应该是容器的 IP。

如果你有新的信息可以继续在这里回复。

<!-- gh-comment-id:1320822545 --> @hwdsl2 commented on GitHub (Nov 19, 2022): @justingkao 你好!这个错误一般是由于 IKEv2 连接未能成功加载导致的。你应该已经启用了 Libreswan 日志。首先重启容器:`docker restart ipsec-vpn-server`。然后查看一下日志中 Libreswan 启动时是否报错。可能有关于 IKEv2 连接不能加载的错误。 如果没有此错误的话,可能是你的容器的 IKEv2 配置的地址不正确。你的日志中的错误显示容器的 IP 为 172.17.0.3,连接请求是来自 172.17.0.1。但你的 ikev2.conf 中的 IP 是 172.17.0.1。我觉得应该是容器的 IP。 如果你有新的信息可以继续在这里回复。
Author
Owner

@hwdsl2 commented on GitHub (Nov 30, 2022):

@justingkao 你好!关于这个Issue,你有什么新发现吗?另外一位用户在 #330 报告了类似的问题。

<!-- gh-comment-id:1332225450 --> @hwdsl2 commented on GitHub (Nov 30, 2022): @justingkao 你好!关于这个Issue,你有什么新发现吗?另外一位用户在 #330 报告了类似的问题。
Author
Owner

@hwdsl2 commented on GitHub (Nov 30, 2022):

@justingkao 我们找到了问题的原因。是因为 Docker 主机的内核不支持 MOBIKE。解决方案请参见:
https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/199#issuecomment-652821751
https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/330

<!-- gh-comment-id:1332279972 --> @hwdsl2 commented on GitHub (Nov 30, 2022): @justingkao 我们找到了问题的原因。是因为 Docker 主机的内核不支持 MOBIKE。解决方案请参见: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/199#issuecomment-652821751 https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/330
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/docker-ipsec-vpn-server#301
No description provided.