Logging Issue
-
Hello,
i would like to monitor per user when he/she connected/disconnected.
in Pfsense 2.1 we used the PPTP Logins page.
this would shows something like this:
Mar 2 14:17:19 [logout] rene 172.17.145.211
Mar 2 14:14:20 [login] rene 172.17.145.211
Feb 16 11:38:47 [logout] rene 172.17.145.211
Feb 16 11:35:55 [login] rene 172.17.145.211so with a cron i pulled in this data and made a web UI so i could see the total time connected for eatch user and a log of when he/she connected/disconnected this worked perfect for us.
but for openvpn there is no logins log page. there is only the status_logs.php?logfile=openvpn page.
these Logs are pretty hard to proces since it shows data in this format.
Mar 6 09:49:59 openvpn 19520 213.207.92.199:40469 [ralph] Peer Connection Initiated with [AF_INET]213.207.92.199:40469
Mar 6 09:50:01 openvpn 19520 ralph/213.207.92.199:40469 send_push_reply(): safe_cap=940
Mar 6 09:55:25 openvpn 19520 ralph/213.207.92.199:40469 [ralph] Inactivity timeout (–ping-restart), restarting.Would it be possible to make an Openvpn logins page?
is there a package maby for pfsense i could install to show me the connected/disconnect time and total time?
Any idea's are welcome.
Thanks in advance
-
you probably want to set the verbosity level higher then default (no clue how high: experiment)
then you could script something to fetch/parse the required data into a text-file or html
clog /var/log/openvpn.log | grep Initiated > logons.txt clog /var/log/openvpn.log | grep Inactivity > timeouts.txt
you probably want more complicated regex or use different tools instead of grep to get it nicely formatted/sorted