[GH-ISSUE #249] 主机上有多个ip ,想使用其中的一个,怎么更改 Server IP #232

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

Originally created by @momomobinx on GitHub (Aug 13, 2021).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/249

任务列表

描述改进建议
增加配置 Server IP

你的改进建议与遇到的问题有关吗?请描述。
(如果适用)清楚,简洁地说明问题所在。

其它信息
添加关于该改进建议的其它信息。

Originally created by @momomobinx on GitHub (Aug 13, 2021). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/249 **任务列表** - [ ] 我搜索了已有的 [Issues](https://github.com/hwdsl2/docker-ipsec-vpn-server/issues?q=is%3Aissue),没有找到类似的改进建议 - [ ] 这个改进建议是关于 IPsec VPN 服务器 Docker 镜像,而不是 IPsec VPN 本身 - [ ] 我已阅读 [自述文件](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README-zh.md) - [ ] 我已阅读 [重要提示](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README-zh.md#重要提示) - [ ] 我已按照说明 [配置 VPN 客户端](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README-zh.md#下一步) - [ ] 我检查了 [故障排除](https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients-zh.md#故障排除),[启用日志](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README-zh.md#启用-libreswan-日志) 并查看了 [VPN 状态](https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients-zh.md#检查日志及-vpn-状态) **描述改进建议** 增加配置 Server IP **你的改进建议与遇到的问题有关吗?请描述。** (如果适用)清楚,简洁地说明问题所在。 **其它信息** 添加关于该改进建议的其它信息。
kerem closed this issue 2026-03-02 08:00:41 +03:00
Author
Owner

@hwdsl2 commented on GitHub (Aug 13, 2021):

@momomobinx 你好!对于你的用例,可以通过在 env 文件里定义变量 VPN_PUBLIC_IP,然后删除并重新创建 Docker 容器 [1] 来实现。例如:

VPN_PUBLIC_IP=192.0.2.1

[1] https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README-zh.md#%E6%9B%B4%E6%96%B0-docker-%E9%95%9C%E5%83%8F

<!-- gh-comment-id:898540630 --> @hwdsl2 commented on GitHub (Aug 13, 2021): @momomobinx 你好!对于你的用例,可以通过在 `env` 文件里定义变量 `VPN_PUBLIC_IP`,然后删除并重新创建 Docker 容器 [1] 来实现。例如: ``` VPN_PUBLIC_IP=192.0.2.1 ``` [1] https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README-zh.md#%E6%9B%B4%E6%96%B0-docker-%E9%95%9C%E5%83%8F
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#232
No description provided.