> On 3. Jun 2021, at 14:36, Jan Just Keijser <janj...@nikhef.nl> wrote:
> from reading the 2.5.1 sources I cannot find any environment variables being 
> set that reflect the "incoming" IP address or interface;   I would think that 
> during 'client-connect' time you can determine from which IP the client is 
> connecting, e.g. by looking at the connection details at the OS level.  This 
> may not be fool proof, however.

how would you suggest to do that? Nothing comes to mind except inspecting the 
conntrack table or logging at the firewall level, which boils down to grepping 
different logs. Not to mention that not everyone is running the vpn server on 
the firewall, noone shouldn’t actually ;)

> It may be best to actually grep the logs, especially as you can easily grep 
> for "Peer Connection Initiated".

Not so easily for tunnels running longer than the logs are kept though. 

> 
> HTH,
> 
> JJK
> 
> PS now waiting for Gert to prove me wrong ;)

Please be wrong ;) Or can we have a feature request for server IP and interface 
to be passed in connect script env or in one of the status reports in 
management interface or in —status file or at all three places ;)

_______________________________________________
Openvpn-users mailing list
Openvpn-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-users

Reply via email to