[GH-ISSUE #456] ikev2 模式如何设置指定多个子网走vpn, 多网段。 #426

Closed
opened 2026-03-02 08:18:52 +03:00 by kerem · 3 comments
Owner

Originally created by @alan699 on GitHub (Nov 13, 2024).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/456

我编辑了变量,VPN_SPLIT_IKEV2=172.29.208.0/20 容器的ikev2.conf文件里leftsubnet=172.29.208.0/20是对的,但我想添加多个网段怎么弄?我试过了加2个"不行,隔一个空格加网段也不行。

Originally created by @alan699 on GitHub (Nov 13, 2024). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/456 我编辑了变量,VPN_SPLIT_IKEV2=172.29.208.0/20 容器的ikev2.conf文件里leftsubnet=172.29.208.0/20是对的,但我想添加多个网段怎么弄?我试过了加2个"不行,隔一个空格加网段也不行。
kerem closed this issue 2026-03-02 08:18:52 +03:00
Author
Owner

@hwdsl2 commented on GitHub (Nov 13, 2024):

@alan699 你好!对于你的用例,请参见以下链接:
github.com/hwdsl2/setup-ipsec-vpn@5525c407c5
https://github.com/libreswan/libreswan/issues/832
https://libreswan.org/man/ipsec.conf.5.html

之前在 Libreswan 较早版本,leftsubnets 参数不工作,所以项目文档去掉了相关的说明(见第一个链接)。现在 Libreswan 版本更新了,有可能已修复,你可以尝试一下。具体步骤(包括 IKEv2 已配置的情况)请参见 VPN 分流

<!-- gh-comment-id:2473767129 --> @hwdsl2 commented on GitHub (Nov 13, 2024): @alan699 你好!对于你的用例,请参见以下链接: https://github.com/hwdsl2/setup-ipsec-vpn/commit/5525c407c503b5b1a15cdd1721697e9e9bae9851 https://github.com/libreswan/libreswan/issues/832 https://libreswan.org/man/ipsec.conf.5.html 之前在 Libreswan 较早版本,leftsubnets 参数不工作,所以项目文档去掉了相关的说明(见第一个链接)。现在 Libreswan 版本更新了,有可能已修复,你可以尝试一下。具体步骤(包括 IKEv2 已配置的情况)请参见 [VPN 分流](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage-zh.md#vpn-%E5%88%86%E6%B5%81)。
Author
Owner

@alan699 commented on GitHub (Nov 14, 2024):

@alan699 你好!对于你的用例,请参见以下链接: hwdsl2/setup-ipsec-vpn@5525c40 libreswan/libreswan#832 https://libreswan.org/man/ipsec.conf.5.html

之前在 Libreswan 较早版本,leftsubnets 参数不工作,所以项目文档去掉了相关的说明(见第一个链接)。现在 Libreswan 版本更新了,有可能已修复,你可以尝试一下。具体步骤(包括 IKEv2 已配置的情况)请参见 VPN 分流

我试试,谢谢。

<!-- gh-comment-id:2475226722 --> @alan699 commented on GitHub (Nov 14, 2024): > @alan699 你好!对于你的用例,请参见以下链接: [hwdsl2/setup-ipsec-vpn@5525c40](https://github.com/hwdsl2/setup-ipsec-vpn/commit/5525c407c503b5b1a15cdd1721697e9e9bae9851) [libreswan/libreswan#832](https://github.com/libreswan/libreswan/issues/832) https://libreswan.org/man/ipsec.conf.5.html > > 之前在 Libreswan 较早版本,leftsubnets 参数不工作,所以项目文档去掉了相关的说明(见第一个链接)。现在 Libreswan 版本更新了,有可能已修复,你可以尝试一下。具体步骤(包括 IKEv2 已配置的情况)请参见 [VPN 分流](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage-zh.md#vpn-%E5%88%86%E6%B5%81)。 我试试,谢谢。
Author
Owner

@alan699 commented on GitHub (Nov 19, 2024):

@alan699 你好!对于你的用例,请参见以下链接: hwdsl2/setup-ipsec-vpn@5525c40 libreswan/libreswan#832 https://libreswan.org/man/ipsec.conf.5.html
之前在 Libreswan 较早版本,leftsubnets 参数不工作,所以项目文档去掉了相关的说明(见第一个链接)。现在 Libreswan 版本更新了,有可能已修复,你可以尝试一下。具体步骤(包括 IKEv2 已配置的情况)请参见 VPN 分流

我试试,谢谢。

补充,分流在安卓的ikev2 生效了,

<!-- gh-comment-id:2484868439 --> @alan699 commented on GitHub (Nov 19, 2024): > > @alan699 你好!对于你的用例,请参见以下链接: [hwdsl2/setup-ipsec-vpn@5525c40](https://github.com/hwdsl2/setup-ipsec-vpn/commit/5525c407c503b5b1a15cdd1721697e9e9bae9851) [libreswan/libreswan#832](https://github.com/libreswan/libreswan/issues/832) https://libreswan.org/man/ipsec.conf.5.html > > 之前在 Libreswan 较早版本,leftsubnets 参数不工作,所以项目文档去掉了相关的说明(见第一个链接)。现在 Libreswan 版本更新了,有可能已修复,你可以尝试一下。具体步骤(包括 IKEv2 已配置的情况)请参见 [VPN 分流](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage-zh.md#vpn-%E5%88%86%E6%B5%81)。 > > 我试试,谢谢。 补充,分流在安卓的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#426
No description provided.