I've had a look round and found solutions like tc
to limit the total allowed bandwidth per user, but what I'm interested in is how to limit the total outbound traffic per user.
I have a server with DigitalOcean that has a 1TB bandwidth cap. Rather than limit the users bandwidth, I'd much rather prefer to set a static cap on the user and/or group. I'm using Ubuntu with a custom written panel. I have Apache and PHP set up to run as the defined user so that I can limit traffic, but I'm not sure as to how I would go about doing so.