OpeVPN log connecting client IPs

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
lolex
OpenVPN Power User
Posts: 52
Joined: Sun Jun 05, 2011 7:50 pm

OpeVPN log connecting client IPs

Post by lolex » Sun Jun 08, 2014 6:34 pm

Hello

I looking for the best solution to log all connecting client's ip to either a text file or a database who logs into my VPN server. Under the IP I mean the public WAN IP on the internet where they are connecting from.

A hack could definitely be to make the openvpn server log to a separate logfile and run logtail periodically to extract the necessary information. So the database I want to build would look like:

Client_Name | Client_IP | Connection_date
roadwarr1 | 72.84.99.11 | 03/04/14 - 22:44:00 Sat

Please don't recommend me to use the commercial Openvpn Access Server. That's not a real solution here. If the disconnection date could be determined that would be even better so I could see how long a client was connected and from where!

Thank you

Post Reply