Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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?
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.