Wednesday, December 03, 2008

Linux SysLog

Linux system log function is to record every activity that took place in a server. It provides information about who logs in or what program is being executed and at what time. I found out sometime ago that someone tried to hack into my server using root id and guessing passwords from the system log. To solve that problem, I disable root id from remote login and a waiting period of 5 minutes if number of tries with wrong password exceeded 3 times.

By default, linux syslog will create a MARK in the log file every 20 minutes just to inform you that it is running in the background. This can make the log file, cluttered and harder to read. Just change this default interval into something better like once every 3 hours (180 minutes) with a command like this.

# /sbin/syslogd -m 180

to view the last 50 lines of the log messages, type this :
# tail -n 50 /var/log/messages

0 Comments:

Post a Comment

<< Home