[GH-ISSUE #275] Environment variables to define ip-range and static ips #255

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

Originally created by @almico on GitHub (Jan 18, 2022).
Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/275

Checklist

Describe the enhancement request
I would like to have environment variables to define:

  • per-user static IPs
  • a different IP range, like in ip range = 192.168.42.100-192.168.42.250

Is your enhancement request related to a problem? Please describe.
In a setup where the physical server acts also as a router, I would like to allow specific VPN users (via their statically assigned VPN IP) to access the outside world and / or the local network. I would like to achieve this relying only on environment variables.

Additional context
None.

Originally created by @almico on GitHub (Jan 18, 2022). Original GitHub issue: https://github.com/hwdsl2/docker-ipsec-vpn-server/issues/275 **Checklist** - [x] I searched existing [Issues](https://github.com/hwdsl2/docker-ipsec-vpn-server/issues?q=is%3Aissue), and did not find a similar enhancement request - [x] This enhancement request is about the IPsec VPN server Docker image, and not IPsec VPN itself - [x] I read the [README](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README.md) - [x] I read the [Important notes](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README.md#important-notes) - [x] I followed instructions to [configure VPN clients](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/README.md#next-steps) - [x] I checked [Troubleshooting](https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients.md#troubleshooting), [enabled logs](https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage.md#enable-libreswan-logs) and checked [VPN status](https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients.md#check-logs-and-vpn-status) **Describe the enhancement request** I would like to have environment variables to define: - per-user static IPs - a different IP range, like in `ip range = 192.168.42.100-192.168.42.250` **Is your enhancement request related to a problem? Please describe.** In a setup where the physical server acts also as a router, I would like to allow specific VPN users (via their statically assigned VPN IP) to access the outside world and / or the local network. I would like to achieve this relying only on environment variables. **Additional context** None.
kerem closed this issue 2026-03-02 08:00:50 +03:00
Author
Owner

@hwdsl2 commented on GitHub (Jan 19, 2022):

@almico Hello! Thank you for your suggestions. For information on per-user static IPs, please refer to [1]. To set a different IP range, you may modify these lines [2] in run.sh.

I understand that you would like to make these customizable using variables in an env file. However, these customizations are not common use cases, and can be difficult to implement. Currently, there are no plans to add them.

With that said, you can instead get the source code of this project and customize and build a Docker image yourself [3], according to the license.

[1] https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/advanced-usage.md#internal-vpn-ips-and-traffic
[2] github.com/hwdsl2/docker-ipsec-vpn-server@e8c25d2333/run.sh (L250-L254)
[3] https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage.md#build-from-source-code

<!-- gh-comment-id:1016079611 --> @hwdsl2 commented on GitHub (Jan 19, 2022): @almico Hello! Thank you for your suggestions. For information on per-user static IPs, please refer to [1]. To set a different IP range, you may modify these lines [2] in `run.sh`. I understand that you would like to make these customizable using variables in an `env` file. However, these customizations are not common use cases, and can be difficult to implement. Currently, there are no plans to add them. With that said, you can instead get the source code of this project and customize and build a Docker image yourself [3], according to the license. [1] https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/advanced-usage.md#internal-vpn-ips-and-traffic [2] https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/e8c25d2333eb774da8ce5d477b97e2481dcdf907/run.sh#L250-L254 [3] https://github.com/hwdsl2/docker-ipsec-vpn-server/blob/master/docs/advanced-usage.md#build-from-source-code
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#255
No description provided.