[GH-ISSUE #301] 在没有公网的私网环境下,可以正常部署,但是无法正常连接上vpn服务器,这个怎么办? #278

Closed
opened 2026-03-02 08:01:02 +03:00 by kerem · 1 comment
Owner

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

切换到公网并修改相应IP,再重启主机后,就可以正常使用了,但私网内怎么办?

Originally created by @xjllhy on GitHub (Jul 19, 2022). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/301 切换到公网并修改相应IP,再重启主机后,就可以正常使用了,但私网内怎么办?
kerem closed this issue 2026-03-02 08:01:02 +03:00
Author
Owner

@hwdsl2 commented on GitHub (Jul 20, 2022):

@xjllhy 你好!请参见:
https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage-zh.md#%E6%8C%87%E5%AE%9A-vpn-%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%9A%84%E5%85%AC%E6%9C%89-ip

在 env 文件中将 VPN_PUBLIC_IP 设置为你的服务器的私有 IP 即可。需要重新创建 Docker 容器。如果已配置 IKEv2,在重新创建之前还需要删除 ikev2-vpn-data Docker 卷(请注意,这将删除所有 IKEv2 配置)。

<!-- gh-comment-id:1189843995 --> @hwdsl2 commented on GitHub (Jul 20, 2022): @xjllhy 你好!请参见: https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage-zh.md#%E6%8C%87%E5%AE%9A-vpn-%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%9A%84%E5%85%AC%E6%9C%89-ip 在 env 文件中将 VPN_PUBLIC_IP 设置为你的服务器的私有 IP 即可。需要重新创建 Docker 容器。如果已配置 IKEv2,在重新创建之前还需要删除 ikev2-vpn-data Docker 卷(请注意,这将删除所有 IKEv2 配置)。
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#278
No description provided.