mirror of
https://github.com/hwdsl2/docker-ipsec-vpn-server.git
synced 2026-04-26 01:55:53 +03:00
[GH-ISSUE #121] Set the subnet range #109
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 @geiseri on GitHub (Jan 30, 2019).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/121
Right now I have a home network that is
10.10.1.0/24and my office subnet is10.0.5.0/24. Right now if I connect to the VPN I can no longer communicate with the office systems because it is trying to route through my home network. Is there a way to tell the VPN to only allow10.10.1.0/24traffic to go over the VPN itself and leave the other routes untouched?@hwdsl2 commented on GitHub (Jan 30, 2019):
@geiseri Hello! If I understand it correctly, you have set up a VPN server within your home network. For your use case, please refer to [1] and read all comments. Clone this Git repo, edit
run.shand changeleftsubnetvalue to10.10.1.0/24. You'll then need to build the Docker image yourself [2] with these customizations, and finally, re-create the container.[1] https://github.com/hwdsl2/setup-ipsec-vpn/issues/514
[2] https://github.com/hwdsl2/docker-ipsec-vpn-server#build-from-source-code
@geiseri commented on GitHub (Jan 30, 2019):
This is what I did now. I just didn't want to run something special, since a) your docker is very well done, and b) I don't want to chase you :)
If I made a PR that made this a tunable with something
VPN_L2TP_NET,VPN_L2TP_LOCAL, andVPN_L2TP_POOL, etc... would that be acceptable?@hwdsl2 commented on GitHub (Jan 30, 2019):
@geiseri Thank you for offering to do a PR. However since this is not a common use case we'll probably look into this in the future (not now).
@geiseri commented on GitHub (Jan 30, 2019):
Okay, I will fork and make a branch. Are you okay with a PR sitting in your queue? Either way, other than this small issue, your docker is a slick solution for me, and I am grateful for your work!
@hwdsl2 commented on GitHub (Jan 30, 2019):
@geiseri Yes, I thought about it again and maybe something like
XAUTH_LEFTSUBNET=${VPN_XAUTH_LEFTSUBNET:-'0.0.0.0/0'}(and also replace line 190 withleftsubnet=$XAUTH_LEFTSUBNETwould be good. Note that this would only apply to IPsec/XAuth connections (not IPsec/L2TP). I'll look at your PR when ready.