mirror of
https://github.com/hwdsl2/docker-ipsec-vpn-server.git
synced 2026-04-26 01:55:53 +03:00
[GH-ISSUE #478] Docker传入 VPN_SPLIT_IKEV2 多个逗号拼接的ip不生效 #449
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hjm6688 on GitHub (Jun 12, 2025).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/478
@hjm6688 commented on GitHub (Jun 12, 2025):
服务器执行 查看传入的参数
echo "$VPN_SPLIT_IKEV2"
10.123.123.0/24,10.120.123.0/24
查看对应的配置文件发现 leftsubnet 没有被替换
vi /etc/ipsec.d/ikev2.conf
@hjm6688 commented on GitHub (Jun 12, 2025):
但是 如果不加逗号,只传入单个IP是正常的
@hwdsl2 commented on GitHub (Jun 12, 2025):
@hjm6688 你好!目前VPN_SPLIT_IKEV2参数仅支持单个子网。
你可以手动编辑容器内的ikev2.conf并重启容器,请参见:
https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/advanced-usage-zh.md#vpn-%E5%88%86%E6%B5%81
如文档所述,对于该用例,使用leftsubnets而不是leftsubnet。
@hjm6688 commented on GitHub (Jun 14, 2025):
@hwdsl2 你好,重新调整后在mac系统上已经实现了分流, 但是widnow11的电脑连接后,就只能访问内网,无法访问外网,试过了三台widnow11都是这样的情况,
也试过了文档中提到的默认网关的勾选,只要关掉后就只能访问外网,无法访问内网
勾选后,就只能访问内网,无法访问外网
请帮忙看看原因
windows11 的 route print 打印的内容如下:

mac的链路如下:

@hwdsl2 commented on GitHub (Jun 14, 2025):
@hjm6688 请尝试 连接 IKEv2 后不能打开网站 中的第三个解决方案: