User`s guide
Chapter 3. Logs
This chapter describes how to setup and use logging on a Freeway . Logging is useful to keep security high because
it allows a system administrator to examine the past history of the Freeway system, to see if the Freeway is being
attacked or used in an inapproriate way, if some errors have occurred or resources are being over-utilized, which
users have logged in, etc.
3.1. Configuring Logging
The Freeway uses the syslogd daemon to log system events, and the /etc/syslog.conf configuration file to
control logging. As usual with Freeway configuration file changes, the best and most flexible way to configure
logging is to put the changes into one centrally-located place, such as the file
/usr/local/freeway/boot.src/rc.startsra, so that changes can be controlled and preserved when the
overall Freeway software is upgraded to a new version. That means that the actual line changes necessary to enable
the syslogd daemon must be inserted into the appropriate files by commands in
/usr/local/freeway/boot.src/rc.startsra.
For example,
Figure 3-1 shows lines which could be added to a Freeway’s
/usr/local/freeway/boot.src/rc.startsra file to configure and enable the syslogd daemon:
Figure 3-1. Configure and Enable the syslogd Daemon
export LOG_DIR="/var/log"
touch ${LOG_DIR}/all.log
echo "
*
.
*
${LOG_DIR}/all.log" > /etc/syslog.conf
if [ -x /usr/sbin/syslogd ]; then
/usr/sbin/syslogd
fi
That example would cause all loggable events to be written to the file /var/log/all.log. Because that file would
continue to grow larger, and would eventually fill the filesystem where it exists, rotating the logs is also important.
Section 3.2 shows lines how to configure a Freeway to automatically rotate and maintain the log files, to archive
them and prevent them from filling a filesystem.
Another syslog configuration example is in
Section 6.7. More information about logging and syslog configuration
is available by logging into a Freeway with any user account and typing man syslog, man syslog.conf, or man
syslogd.
3.2. Maintaining Logs
To setup a Freeway to maintain the logs files automatically, archiving old copies, compressing them if desired, and
deleting the oldest log files when necessary to prevent filling a filesystem, the Freeway can use the newsyslog
utility. That utility is controlled and configured by the newsyslog.conf file, and can be run automatically
12