LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-17-2020, 11:36 AM   #1
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 192

Rep: Reputation: Disabled
tcpdump based on username


rhel 6.10
I need to know if there is a way to do a tcpdump based on username, or that shows the username initiating the connection.
I've been trying to look for this, but haven't found anything.

I have a lot of attempts to authenticate on an ldap server, and I am trying to find what is making the attempts.
I know a couple sources, so I'd like to run it on these sources, and also from the ldap server. Logs haven't been overly useful, and the guy doing ldap is pretty new and I don't think he has turned on the logging in the Oracle directory manager to trace where auth attempts are coming from.

So, I am trying to check some things and help him out, as well.

Thanks!
 
Old 03-17-2020, 11:43 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,319
Blog Entries: 3

Rep: Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723
I'm rather sure that tcpdump cannot do that by itself. What might work would be to use NFTables or IPTables to log packets based on uid or gid. Then use tcpdump to track those logged packets.
 
Old 03-17-2020, 12:01 PM   #3
vinmansbrew
Member
 
Registered: Feb 2016
Posts: 192

Original Poster
Rep: Reputation: Disabled
I was kind of coming to that conclusion with tcpdump. I'll have to look at iptables.
 
Old 03-17-2020, 12:03 PM   #4
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,319
Blog Entries: 3

Rep: Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723Reputation: 3723
If you haven't installed anything, nftables would be preferable if it is available for CentOS 6.
 
Old 03-17-2020, 03:58 PM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
wireshark can filter on practically anything including LDAP details, and it runs on RHEL, too. Perhaps tshark, the text version, is as powerful.
 
Old 03-31-2020, 01:27 PM   #6
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
You can actually generate pcaps with tcpdump and then visualise them with Wireshark. You don't necessarily have to use other tools (tshark) on the host itself. Not that using tshark on the server itself would be a bad idea.

e.g.
Code:
tcpdump port 389 -i eth0 -w mycap.pcap
I'm not sure if you need/can make it more verbose, but I think normally it should suffice.
 
  


Reply



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
I've found tcpdump tagged as 'Installed' in PPM, why I can't find a tcpdump command ? illidan.modeler Puppy 1 09-07-2013 07:50 AM
Why "bash-2.05b$" in Terminal instead of "username@localhost username" jayelitumbiolo Linux - General 9 10-04-2009 03:16 AM
fedora 8 asking username but during installation i dint give any username ?? herevenku Linux - Newbie 2 08-25-2008 04:37 AM
Differance between su <username> and su <username> - guguma Linux - General 3 08-19-2007 01:01 PM
useradd: invalid username username$ engyeow Fedora 5 12-05-2004 04:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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