LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-07-2006, 08:32 PM   #1
wilby
LQ Newbie
 
Registered: Feb 2006
Posts: 11

Rep: Reputation: 1
What log files should be checked regularly?


I did a couple of searches and did not see any threads like this so I thought I would ask.

I'm not exactly new to linux but I'm not an expert either. I know to use dmesg when I want to check for hardware issues or when installing new devices. I know where to look for samba or web logs and such and I'm sure I could manage to find the locations of any log I wanted to find. What I want to know is if there is a standard list of log files to check on a regular basis?

The only ones I really look at now are my boot log and sys log.

Lately I have been reading alot about hackers and network insecurity and I'm becoming more and more concerned about intruders or even port scans and such. I'm not really sure what log file to look at for user logins or remote connections.

Can someone give me a fairly complete list of log files to review on a regular basis? Thank you in advance for any help anyone can offer.
 
Old 07-07-2006, 11:11 PM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
The location of system logs tend to vary from distro to distro, so it helps if you can tell us which one you're using. It also depends on what applications/daemons you are running. For example Apache has its own set of logs as do a host of other daemons, so you'll need to specify those as well.

There are also some great tools that parse the various system and application logs and mail summaries to root. A list of these can be found in the Security References thread at the top of the forun.

Last edited by Capt_Caveman; 07-07-2006 at 11:12 PM.
 
Old 07-08-2006, 12:14 AM   #3
wilby
LQ Newbie
 
Registered: Feb 2006
Posts: 11

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Capt_Caveman
The location of system logs tend to vary from distro to distro, so it helps if you can tell us which one you're using.
I use Slackware 10.1 running kernel 2.4.29

Quote:
Originally Posted by Capt_Caveman
It also depends on what applications/daemons you are running.
Daemons are as follows:
PID TTY TIME CMD
1 ? 00:00:04 init
2 ? 00:00:00 keventd
3 ? 00:00:00 ksoftirqd_CPU0
4 ? 00:00:15 kswapd
5 ? 00:00:00 bdflush
6 ? 00:00:02 kupdated
10 ? 00:00:00 mdrecoveryd
11 ? 00:00:00 kreiserfsd
61 ? 00:00:03 syslogd
64 ? 00:00:00 klogd
112 ? 00:00:00 udevd
270 ? 00:00:00 khubd
386 ? 00:00:00 dhcpcd
1765 ? 00:00:00 inetd
1769 ? 00:00:13 sshd
1773 ? 00:00:00 named
1781 ? 00:00:00 crond
1784 ? 00:00:00 sendmail
1787 ? 00:00:00 sendmail
1795 ? 00:00:00 httpd
1798 tty2 00:00:00 agetty
1799 tty3 00:00:00 agetty
1800 tty4 00:00:00 agetty
1801 tty5 00:00:00 agetty
1802 tty6 00:00:00 agetty
1803 ? 00:00:00 httpd
1804 ? 00:00:00 httpd
1805 ? 00:00:00 httpd
1806 ? 00:00:00 httpd
1807 ? 00:00:00 httpd
1825 tty1 00:00:00 agetty
1867 ? 00:00:00 httpd
1912 ? 00:00:00 httpd
11531 ? 00:00:00 sshd
11534 pts/0 00:00:00 bash
11572 pts/0 00:00:00 ps


Quote:
Originally Posted by Capt_Caveman
There are also some great tools that parse the various system and application logs and mail summaries to root. A list of these can be found in the Security References thread at the top of the forun.
I have seen these tools but I was kind of hoping to get a little creative with a script, I guess I have nothing better to do with my time. Thanks for your help.
 
Old 07-09-2006, 12:30 PM   #4
wilby
LQ Newbie
 
Registered: Feb 2006
Posts: 11

Original Poster
Rep: Reputation: 1
Does anyone have any input, maybe even the logs that your personally check on a regular basis? I'm really interested in the remote login logs.

-Thanks
WIlby
 
Old 07-09-2006, 02:12 PM   #5
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
My slackware box is temporarily out of commission, so I can't verify the accuracy of this, but I believe there is a standard area for logs in Slackware is in the /var/log directory. You should have a generel security log in /var/log/security which will show things like SSH logins along with other security messages. A log for general system messages should be in /var/log/messages. Regardless, you should check the /etc/syslog.conf file to verify where log messages are being sent.

I believe your Apache logs will be in /usr/local/apache/logs/. The 2 most important ones to monitor will be the access_log and the error_log.

As far as creating a homebrew script, that is entirely reasonable. Many of the common tools essentially do just that, so you may want to take a look at their source code to get some ideas. Hardest part will likely be tweaking your regex's to get everything you need without too many false positves.
 
Old 07-09-2006, 08:23 PM   #6
wilby
LQ Newbie
 
Registered: Feb 2006
Posts: 11

Original Poster
Rep: Reputation: 1
That's all good info Capt_Caveman, it's exactly what I was looking for. I appreciate your response and I'll try to remember to post here with my success/failure. Thanks again.
 
  


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
Regularly switching between monitors ianunderwood SUSE / openSUSE 2 08-04-2005 12:34 PM
Deleted /var/log/messages, can't log any files-iptables chingyenccy Linux - Newbie 7 02-27-2005 04:03 PM
Run fsck regularly? macnut Linux - General 1 12-27-2004 07:36 AM
Samba wasn't running - checked log file today duality Red Hat 1 07-24-2004 01:52 AM
Can log files be time stamped? (such as FTP login and transfer log files) bripage Linux - Networking 6 08-08-2002 10:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:31 AM.

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