Pass details of client as parameters with client-connect command

How to customize and extend your OpenVPN installation.
Post Reply
john_paul
OpenVpn Newbie
Posts: 6
Joined: Sun Oct 20, 2019 10:04 am

Pass details of client as parameters with client-connect command

Post by john_paul » Mon Oct 21, 2019 3:29 pm

I am making use of the client-connect functionality, but as of now it is simply running a single script any time a client connects. Is it possible to pass more parameters to this script, e.g. the common name of the client, the remote IP address etc.?

I have already tried using different client-connect commands in separate client-config-dir files but this doesn't work. It seems it needs to be in the server.conf file.

Otherwise, are there any command line tools the script can use to get the information I need from OpenVPN, other than just grepping a log file?

john_paul
OpenVpn Newbie
Posts: 6
Joined: Sun Oct 20, 2019 10:04 am

Re: Pass details of client as parameters with client-connect command

Post by john_paul » Sat Oct 26, 2019 9:45 am

OK I found out what I need is stored in environment variables

Post Reply