LinuxQuestions.org
Review your favorite Linux distribution.
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 03-14-2010, 04:25 AM   #1
mario.almeida
Member
 
Registered: May 2008
Location: India
Distribution: Ubuntu 10.04, CentOS, Manjaro
Posts: 179

Rep: Reputation: 27
network traffic for a give user


OS : CentOS 5.3 64bit

How to trace incoming and outgoing network traffic for a give user?

User 'A' logs in to the system and does various network connectivity

As root user need to find what are the outgoing and incoming connection that are related with user 'A'.

basically need to check the connection flow.

netstat will show ESTABLISHED, LISTEN etc..

need something like tcpdump

Eg:-
--user option for tcpdump
tcpdump -vv -nn -i eth0 host 10.200.2.1 and tcp dst port 8080 --user A

Can someone tell me any tool which can do such thing?

Even if it can show the process ID of the client application which is trying to establish network connectivity will do.
 
Old 03-15-2010, 02:17 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
No. There's the Owner module for iptables which you could use to filter the connection creations with their UID's (and so with a limited number of user accounts you could have a separate rule for each user to log their traffic as it's not apparently possible to dynamically substitute the user in to the log message), but to directly view it like you want goes between too many layers of the system. by the time tcpdump inspects the data, it is long past being related to a user request.
 
1 members found this post helpful.
  


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
Monitor current network traffic to a give host ulver Linux - Networking 1 10-29-2009 05:41 AM
How to Traffic Shape to Give Surfing Priority bt101 Linux - Networking 1 02-15-2009 02:45 AM
Can I log network traffic together with user names through iptables? colucix Linux - Networking 5 03-19-2008 05:03 PM
Network Traffic Stops After High Traffic windisch Linux - Networking 6 12-17-2007 05:45 PM
use iptables to give net traffic priority to web browsers ? qwijibow Linux - Security 2 02-17-2004 08:10 AM

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

All times are GMT -5. The time now is 01:29 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