Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have "chrooted" my users in my Ubuntu Server and I need to monitor their bandwidth usage. Since they can access to a FTP, a SSH and a website runned by a chrooted PHP-FPM, I need to monitor all these usages too.

I've took a look at ntop, vnStat, bmon and some others, but they all seems to monitor bandwidth by their interfaces. Is there any way to measure those informations on a user based?

share|improve this question

migrated from stackoverflow.com May 26 '13 at 0:43

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

The iptables owner module can mark packets based on UID. Then you could use some backend like ulogd to log their size and then process the log and compute totals. However, it can handle only locally generated packets, which means you'll be able to count just outgoing data, not incoming one as well.

share|improve this answer
add comment

I know commercial programs in windows can do that: wfilter or websense.

You can use iptables TEE target to forward packets to a remote windows computer and deploy internet monitoring in the windows computer.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.