[GH-ISSUE #311] 更新docker镜像,手机vpn无法连接 #290

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

Originally created by @ynhj123 on GitHub (Oct 11, 2022).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/311

问题描述
你好,我最近更新了docker镜像,发现手机的vpn无法连接。在镜像中输入ipsec status,发现如下错误
image
我按照文档在env中添加VPN_ENABLE_MODP1024=yes后重新创建,我的手机依然无法链接,ipsec status 如下:
image

其他:
连接2周前的镜像没有问题,如果可以dockhub是否可以添加多个版本,我现在更新后也无法回滚到之前的版本

Originally created by @ynhj123 on GitHub (Oct 11, 2022). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/311 **问题描述** 你好,我最近更新了docker镜像,发现手机的vpn无法连接。在镜像中输入ipsec status,发现如下错误 ![image](https://user-images.githubusercontent.com/26181404/195008103-030fafc7-06a1-42a6-8062-bb04b1c8da36.png) 我按照文档在env中添加VPN_ENABLE_MODP1024=yes后重新创建,我的手机依然无法链接,ipsec status 如下: ![image](https://user-images.githubusercontent.com/26181404/195012412-ab97bd18-00cf-4c03-8c30-6a8307c8349e.png) 其他: 连接2周前的镜像没有问题,如果可以dockhub是否可以添加多个版本,我现在更新后也无法回滚到之前的版本
kerem closed this issue 2026-03-02 08:01:07 +03:00
Author
Owner

@archwolf118 commented on GitHub (Oct 11, 2022):

遇到同样的问题,帮忙解决,谢谢!

<!-- gh-comment-id:1274634416 --> @archwolf118 commented on GitHub (Oct 11, 2022): 遇到同样的问题,帮忙解决,谢谢!
Author
Owner

@hwdsl2 commented on GitHub (Oct 11, 2022):

@ynhj123 你好!启用 Libreswan 日志 [1],然后重新尝试连接。然后检查日志是否有错误?最近有多位用户遇到 GFW 屏蔽的问题,可能不是镜像的原因。

如果你想尝试 2 周前的镜像:

git clone https://github.com/hwdsl2/docker-ipsec-vpn-server
cd docker-ipsec-vpn-server
# Make sure you add the dot (.) at the end for this command
git checkout ef81fc9e425f480aa0659adc4a7dceb22e07e3fb .
# To build Alpine-based image
docker build -t hwdsl2/ipsec-vpn-server .

然后重新创建 Docker 容器。

[1] 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:1274875826 --> @hwdsl2 commented on GitHub (Oct 11, 2022): @ynhj123 你好!启用 Libreswan 日志 [1],然后重新尝试连接。然后检查日志是否有错误?最近有多位用户遇到 GFW 屏蔽的问题,可能不是镜像的原因。 如果你想尝试 2 周前的镜像: ``` git clone https://github.com/hwdsl2/docker-ipsec-vpn-server cd docker-ipsec-vpn-server # Make sure you add the dot (.) at the end for this command git checkout ef81fc9e425f480aa0659adc4a7dceb22e07e3fb . # To build Alpine-based image docker build -t hwdsl2/ipsec-vpn-server . ``` 然后重新创建 Docker 容器。 [1] 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

@ynhj123 commented on GitHub (Oct 12, 2022):

@hwdsl2 你好,我启动了Libreswan 日志 [1],并重新链接,新生成如下日志:
image

<!-- gh-comment-id:1275533204 --> @ynhj123 commented on GitHub (Oct 12, 2022): @hwdsl2 你好,我启动了Libreswan 日志 [1],并重新链接,新生成如下日志: ![image](https://user-images.githubusercontent.com/26181404/195241987-d0e4b8dd-965a-486e-8ca1-4a1e878e708a.png)
Author
Owner

@hwdsl2 commented on GitHub (Oct 12, 2022):

@ynhj123 从你的日志来看,很可能是连接被 GFW 屏蔽或干扰了。建议你另外尝试一下比如 Shadowsocks。

<!-- gh-comment-id:1275611764 --> @hwdsl2 commented on GitHub (Oct 12, 2022): @ynhj123 从你的日志来看,很可能是连接被 GFW 屏蔽或干扰了。建议你另外尝试一下比如 Shadowsocks。
Author
Owner

@ynhj123 commented on GitHub (Oct 12, 2022):

@hwdsl2 为了验证这个问题,我重新开启了一台机器,使用最新的镜像错误日志如下:
image
然而我使用2周前的包可以正常链接

<!-- gh-comment-id:1275738812 --> @ynhj123 commented on GitHub (Oct 12, 2022): @hwdsl2 为了验证这个问题,我重新开启了一台机器,使用最新的镜像错误日志如下: ![image](https://user-images.githubusercontent.com/26181404/195282471-e2ea7aff-938d-4f9c-9ca0-c7a9e8cef8a9.png) 然而我使用2周前的包可以正常链接
Author
Owner

@hwdsl2 commented on GitHub (Oct 12, 2022):

@ynhj123 你的最新日志中的问题 no acceptable Oakley Transform 是可以通过在 env 文件中添加 VPN_ENABLE_MODP1024=yes 并重新创建 Docker 容器解决的。这是因为最近本项目禁用了安全性低的 modp1024。不推荐启用 modp1024,Android 用户推荐使用更安全的 IKEv2 模式连接。

你的之前日志中的问题可能是 GFW 屏蔽导致的。

<!-- gh-comment-id:1276250789 --> @hwdsl2 commented on GitHub (Oct 12, 2022): @ynhj123 你的最新日志中的问题 no acceptable Oakley Transform 是可以通过在 env 文件中添加 VPN_ENABLE_MODP1024=yes 并重新创建 Docker 容器解决的。这是因为最近本项目禁用了安全性低的 modp1024。不推荐启用 modp1024,Android 用户推荐使用更安全的 IKEv2 模式连接。 你的之前日志中的问题可能是 GFW 屏蔽导致的。
Author
Owner

@ynhj123 commented on GitHub (Oct 12, 2022):

@hwdsl2 非常感谢你的帮助,这个问题得到了解决

<!-- gh-comment-id:1276279101 --> @ynhj123 commented on GitHub (Oct 12, 2022): @hwdsl2 非常感谢你的帮助,这个问题得到了解决
Author
Owner

@ynhj123 commented on GitHub (Oct 20, 2022):

@hwdsl2 你好,最近的服务器经常被GFW屏蔽,有什么好方法防止被屏蔽吗

<!-- gh-comment-id:1285203324 --> @ynhj123 commented on GitHub (Oct 20, 2022): @hwdsl2 你好,最近的服务器经常被GFW屏蔽,有什么好方法防止被屏蔽吗
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#290
No description provided.