How to know the duration of the connection users in openVPN?
In the era of total udalenka set the task of taking into account the time users connect to the OpenVPN server. The server on FreeBSD without any web Mord and other statistics.
There is a status log view file
ivanov.as IP_addres,56924339,46404603,Thu Apr 16 07:20:32 2020
petrov.da,IP_addres,26209226,320310272,Thu Apr 16 07:48:03 2020
robt.mv IP_addres,341887484,1000952454,Thu Apr 16 08:08:04 2020
You can parse it by user and write to a separate log ? Have any other options?
Through management console (command "status 2") to obtain a list of connected users (lines CLIENT_LIST) and select from the record the time unit of timestamp (field "Connected Since (time_t)" 9th in the list). And then to make record time in a convenient way.
But for this, the config servers should be spelled string management address port
The script for the survey can be run through the crowns, or some daemon to keep connection to the server console.