LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-04-2008, 11:54 AM   #1
fireball003
Member
 
Registered: Apr 2005
Location: Bangladesh
Distribution: Soalris10 , Slackware11
Posts: 54

Rep: Reputation: 15
log for TCP/IP (TCP) connection?


Hi,
In my server clients connect using TCP and send data. I need to check some activity of past few weeks.

Now is there any log for TCP/IP connection or IP based activity? How to konw who were connected to my server IP and port in last few weeks? Also how can I know what data was sent?

FYI these connections are not logged in apache log as this is directly TCP connection and apache (or port 80) is never touched.

Please suggest me.

Thanks in advance.

Last edited by fireball003; 12-04-2008 at 11:57 AM.
 
Old 12-04-2008, 12:48 PM   #2
sparc86
Member
 
Registered: Jul 2006
Location: Joinville, Brazil
Distribution: Debian, CentOS
Posts: 301

Rep: Reputation: 31
It seems like you want to use a sniffer. There are a lot of tools like that on the web, I think you should try as many as possible and then select the one which suits better to your needs.

Maybe you could try tcpflow at first.
 
Old 12-04-2008, 01:00 PM   #3
fireball003
Member
 
Registered: Apr 2005
Location: Bangladesh
Distribution: Soalris10 , Slackware11
Posts: 54

Original Poster
Rep: Reputation: 15
Thanks for your response.
No, rather I need existing log for IP and port based connections. Isn't there any default log for IP and port based connections made? Or can't I see it without using sniffer?
 
Old 12-04-2008, 01:10 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by fireball003 View Post
Thanks for your response.
No, rather I need existing log for IP and port based connections. Isn't there any default log for IP and port based connections made? Or can't I see it without using sniffer?
Well, IP and port based connections is kind of vague. SSH/telnet access is usually kept track of in your syslog...ftp may (or may not), be in there too, or may have its own log file. Web access is in apache logs, and if you're using a 'listener' type system (MySQL, Oracle, etc.), those connections are in another file.

All of these will depend on the level of logging you've enabled in each of the apps, as to where and if you get anything. If you want to see EVERYTHING, you're going to have to use a sniffer
 
Old 12-04-2008, 01:58 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by fireball003
Now is there any log for TCP/IP connection or IP based activity? How to konw who were connected to my server IP and port in last few weeks? Also how can I know what data was sent?
This is generally something you need to think about in advance.

Two possibilities are:
  • Application-level tcp/ip logging. (Did you set that up? If so, check there.)
  • Host firewall-level tcp/ip logging. (This requires specifically setting the LOG target via iptables.)

Layer 7 logging is a whole other animal, and would best be handled (again) at the application level.
 
  


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
Accessing TCP flags in TCP packets on Linux using C !! vishamr2000 Programming 2 10-16-2006 09:46 AM
Linux change TCP kernel Parameter for TCP DELAY ACK TICKS linux_mando Linux - Networking 5 08-22-2006 08:20 AM
Woody 3.0 Open Ports 1470/tcp/uaiact 1518/tcp/vpvd What for?How can I remove them? alexxxis Debian 5 07-05-2004 05:18 PM
Log tcp wrappers tunedLow Linux - Security 1 05-15-2003 08:48 PM
close port 6000/tcp 515/tcp SchwipSchwap Linux - Newbie 1 09-12-2002 08:24 AM

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

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