kylemanna / docker-openvpn

🔒 OpenVPN server in a Docker container complete with an EasyRSA PKI CA
https://hub.docker.com/r/kylemanna/openvpn/
MIT License
8.73k stars 2.39k forks source link

Users usage log #655

Open alipourostad opened 3 years ago

alipourostad commented 3 years ago

Is there anyway to see users usage logs or limit them? how many devices connected with one config file or how many times a user connected to server. or traffic usage?

we6607 commented 3 years ago

楼主可以发下这个版本的软件下地址吗谢谢了!!我没找到。

kimsyversen commented 3 years ago

You can run sudo docker exec -it openvpn cat /tmp/openvpn-status.log to get some of the information you want. Thanks to some guy in one of the issues here :)

leksuss commented 2 years ago

This is not exactly what you want, but container's logs has much more information about user connections than in /tmp/openvpn-status.log. You can find it on host machine here: /var/lib/docker/containers/<container_id>/<container_id>-json.log

For example I can find all connections for all time filtered by user you need like this: cat <container_id>-json.log | grep "\[<user>\] Peer Connection Initiated with"