OVPN 2.4 - How to log both bandwidth and data use per client?
Posted: Tue May 11, 2021 4:21 pm
I've been scouring the net for two days and have come across a lot of interesting articles and solutions that seem to work for some but so far, not for me. From the posts I've read, many others have sought this answer but for what ever reason, this still eludes me. I figure it's time to post here just to get some leads since Google is leading me down rabbit holes left and right.
I know about the disconnect script but the reason this doesn't work for me is because some of the clients keep their tunnels open 24/7.
I'm using a script to update an ongoing record of each clients Bytes Received and Bytes Sent but this doesn't give me a way to know how much bandwidth and data a client has used at any given period, a day, a month, etc. If I could know that, then I could have a method of making sure that no one client uses up too much bandwidth or data using shaping and other methods.
I am testing this also;
https://github.com/jofrep/scripts/blob/ ... n-users.pl
However, I wonder if there are already tools built into ovpn that I have simply not been able to find yet that could do what I'm after.
So again, to be clear, I know about the tools I can use later to control bandwidth and limit usage but the first thing I cannot solve is finding a simple way of knowing how much resource any one client is using up since they aren't always logging off.
I hope this makes sense as I'm quite new to ovpn.
I know about the disconnect script but the reason this doesn't work for me is because some of the clients keep their tunnels open 24/7.
I'm using a script to update an ongoing record of each clients Bytes Received and Bytes Sent but this doesn't give me a way to know how much bandwidth and data a client has used at any given period, a day, a month, etc. If I could know that, then I could have a method of making sure that no one client uses up too much bandwidth or data using shaping and other methods.
I am testing this also;
https://github.com/jofrep/scripts/blob/ ... n-users.pl
However, I wonder if there are already tools built into ovpn that I have simply not been able to find yet that could do what I'm after.
So again, to be clear, I know about the tools I can use later to control bandwidth and limit usage but the first thing I cannot solve is finding a simple way of knowing how much resource any one client is using up since they aren't always logging off.
I hope this makes sense as I'm quite new to ovpn.