flint
I'm trying to set up a port forwarding for clients after they authenticate and are assigned with vpn ip, based on the last octet of their vpn ip. Problem now is I was told that client-connect is called sooner before server allocates vpn ip to clients so it doesn't pass the assigned vpn ip to script.
I couldn't think of any workarounds to get their vpn ip to use in the script. Do you have any idea?
Mimiko
In your script use "trusted_ip" environment variable to find the client's IP.
janjust
the env var 'trusted_ip' is the non-VPN IP address of the VPN endpoint.
the env var 'ifconfig_pool_remote_ip' contains the IP address that will be assigned from the pool of VPN IP addresses, unless the 'client-connect' script wishes to override this.
Alternatively you can use a 'learn-address' script , which is called a little later in the setup flow.
Mimiko
Thank you junjust. I was't shure for the variables.
flint
@janjust
Thanks, using the combination of ifconfig_pool_remote_ip and learn-address works 😃