LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-21-2009, 10:55 AM   #1
iamacup
LQ Newbie
 
Registered: Oct 2003
Posts: 6

Rep: Reputation: 0
Record / Monitor amount of traffic a user has used for ssh tunnelling?


I was wondering if there was a way of recording the amount of traffic a specific users shell account uses. I currently allow a couple of people to tunnel through my server with /bin/false so they can’t execute shell commands.

I was wondering if there was a way to record what their traffic usage was individually.

Thanks!
 
Old 12-22-2009, 08:36 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Have a look at http://www.pmacct.net/

cheers
 
Old 12-28-2009, 02:53 PM   #3
iamacup
LQ Newbie
 
Registered: Oct 2003
Posts: 6

Original Poster
Rep: Reputation: 0
I hate googling and finding threads that have no answers so here is what I have done
You can not, as far as I have worked out use pmacct to work out what info is coming from a specific user on your system. Instead you must tag each packet with the uid of the user that ran the process that send it. See:

http://serverfault.com/questions/520...ldest#sort-top

This however would not work for me because I use several VPS’s all of which do not have the required IPTables modules to do this ‘colouring’ of packets so I took an unconventional approach which has worked quite well, and in fact does more than what I wanted in the first place.

I am using HTTP tunnel from Sebastian Weber. I have modified it to store the username//password into a mysql database alongside the bandwidth that user has used to data. I have then pushed the SSH tunnels over this ‘http’ tunnel. This is a better solution for me as the whole problem in the first place was tunnelling over networks which did not necessarily allow access to certain ports / services (including possibly ssh).

This way, people can tunnel their SSH connections over normal HTTP post requests. This is more efficient than using the http tunnel on its own as everything is in one single stream & is strongly encrypted. http tunnel uses a large number of threads for individual requests so using an ssh tunnel over it is much better.
sort-top
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh tunnelling through a firewall statistic Linux - Networking 4 05-03-2009 08:07 PM
traffic monitor per user (like BSD IPF uid rules) bobdoll Linux - Networking 2 04-02-2009 01:48 AM
monitor sftp traffic per user gernonimo Linux - Networking 3 03-22-2009 05:44 PM
SSH Tunnelling Only Server humbletech99 Linux - Security 1 08-03-2007 08:33 PM
tightvnc using ssh tunnelling curmudgeon42 Linux - Software 1 08-18-2004 09:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration