hwdsl2 / setup-ipsec-vpn

Scripts to build your own IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2
Other
25.38k stars 6.33k forks source link

Environment variables to define ip-range and static ips #1081

Closed almico closed 2 years ago

almico commented 2 years ago

Checklist

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

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 Nothing.

letoams commented 2 years ago

On Mon, 17 Jan 2022, almico wrote:

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

  • per-user static IPs

This is not yet supported directly by libreswan, although planned. And you can work around it by certificate ID wildcard matching.

  • a different IP range, like in ip range = 192.168.42.100-192.168.42.250

Like here. I'm not sure if this project supports it, but you can create two conns that only differ in name, addresspool and rightid= wildcard matching.

Note that libreswan does not pass anything via env variables.

Paul

almico commented 2 years ago

Ouch! I started digging the documentation on the "docker-ipsec-vpn-server". I fear I didn't notice there was some cross-reference, thus I ended up opening this issue here, but it makes more sense on the other page. I'm sorry for that!