[GH-ISSUE #481] 安卓15,IKEv2方式连接失败,报错: 用户鉴权失败 #451

Closed
opened 2026-03-02 08:19:02 +03:00 by kerem · 2 comments
Owner

Originally created by @JUSTWILLPOWER on GitHub (Sep 7, 2025).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/481

任务列表

问题描述
我按照教程在我的dsm上用docker搭建了服务器,下载p12文件在windows上面连接成功,但是将p12安装在安卓手机上后,直接使用自带的vpn连接(类型: IKEv2/IPSec RSA)失败了,然后下载sswan配置,尝试使用客户端strongSwan后,报错,无法建立vpn: 用户鉴权失败,可以肯定的是域名和服务器的输出是一致的,但是还是出现了这个问题

重现步骤
重现该 bug 的步骤:

  1. 按照教程配置docker服务器
  2. 安卓手机使用IKEv2方式

期待的正确结果
连接成功

日志
启用日志,检查 VPN 状态,并且添加错误日志以帮助解释该问题(如果适用)。
服务器没问题

服务器信息(请填写以下信息)

  • Docker 主机操作系统:
    群晖7.2
  • 服务提供商(如果适用):
    自家公网
    客户端信息(请填写以下信息)
  • 设备:
    vivo x200s
  • 操作系统:
    (android 15)
  • VPN 模式:
    IKEv2

其它信息

Image

Originally created by @JUSTWILLPOWER on GitHub (Sep 7, 2025). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/481 **任务列表** - [x] 我已阅读 [重要提示](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README-zh.md#重要提示) - [x] 我已阅读 [自述文件](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README-zh.md) - [x] 我已按照说明 [配置 VPN 客户端](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README-zh.md#下一步) - [x] 我检查了 [IKEv1 故障排除](https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients-zh.md#ikev1-故障排除),[IKEv2 故障排除](https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/ikev2-howto-zh.md#ikev2-故障排除),[启用日志](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage-zh.md#启用-libreswan-日志) 并查看了 [VPN 状态](https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients-zh.md#检查日志及-vpn-状态) - [x] 我搜索了已有的 [Issues](https://github.com/hwdsl2/docker-ipsec-vpn-server/issues?q=is%3Aissue) - [x] 这个 bug 是关于 IPsec VPN 服务器 Docker 镜像,而不是 IPsec VPN 本身 <!--- 如果你发现了 IPsec VPN 的一个可重复的程序漏洞,请在 https://github.com/libreswan/libreswan 提交一个错误报告。VPN 的相关问题可在 [Libreswan](https://lists.libreswan.org) 或 [strongSwan](https://lists.strongswan.org) 用户邮件列表提问,或者搜索比如 [Stack Overflow](https://stackoverflow.com/questions/tagged/vpn) 等网站。 ---> **问题描述** 我按照教程在我的dsm上用docker搭建了服务器,下载p12文件在windows上面连接成功,但是将p12安装在安卓手机上后,直接使用自带的vpn连接(类型: IKEv2/IPSec RSA)失败了,然后下载sswan配置,尝试使用客户端strongSwan后,报错,无法建立vpn: 用户鉴权失败,可以肯定的是域名和服务器的输出是一致的,但是还是出现了这个问题 **重现步骤** 重现该 bug 的步骤: 1. 按照教程配置docker服务器 2. 安卓手机使用IKEv2方式 **期待的正确结果** 连接成功 **日志** [启用日志](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage-zh.md#启用-libreswan-日志),检查 [VPN 状态](https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients-zh.md#检查日志及-vpn-状态),并且添加错误日志以帮助解释该问题(如果适用)。 服务器没问题 **服务器信息(请填写以下信息)** - Docker 主机操作系统: 群晖7.2 - 服务提供商(如果适用): 自家公网 **客户端信息(请填写以下信息)** - 设备: vivo x200s - 操作系统: (android 15) - VPN 模式: IKEv2 **其它信息** ![Image](https://github.com/user-attachments/assets/0883f142-c224-42b6-bef8-a576d93d7c7a)
kerem closed this issue 2026-03-02 08:19:02 +03:00
Author
Owner

@hwdsl2 commented on GitHub (Sep 7, 2025):

@JUSTWILLPOWER 你好!请启用服务器上的 Libreswan 日志,再次尝试连接,然后查看日志是否有错误:
https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage-zh.md#%E5%90%AF%E7%94%A8-libreswan-%E6%97%A5%E5%BF%97

<!-- gh-comment-id:3263973461 --> @hwdsl2 commented on GitHub (Sep 7, 2025): @JUSTWILLPOWER 你好!请启用服务器上的 Libreswan 日志,再次尝试连接,然后查看日志是否有错误: https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage-zh.md#%E5%90%AF%E7%94%A8-libreswan-%E6%97%A5%E5%BF%97
Author
Owner

@hwdsl2 commented on GitHub (Sep 8, 2025):

@JUSTWILLPOWER 该镜像当前与群晖 Synology NAS 系统不兼容。请参见之前类似的 Issue,比如 https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/357, https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/365. 对于此用例,建议你尝试一下其他解决方案。

<!-- gh-comment-id:3264504097 --> @hwdsl2 commented on GitHub (Sep 8, 2025): @JUSTWILLPOWER 该镜像当前与群晖 Synology NAS 系统[不兼容](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README-zh.md#%E9%95%9C%E5%83%8F%E5%AF%B9%E7%85%A7%E8%A1%A8)。请参见之前类似的 Issue,比如 https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/357, https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/365. 对于此用例,建议你尝试一下其他解决方案。
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#451
No description provided.