OVERVIEW

syslogForwarder.pl and syslogReceiver.pl are designed to work
together to create an encrypted syslog tunnel for your secure
syslog needs.  It may not be perfect, but it's a great start
and it's been used on production systems for several years now.

syslogForwarder.pl:
  Listens on a local network port (usually 127.0.0.2:514) for 
  incoming messages from the local syslog daemon, encrypts the 
  messages and forwards them to a remote host, which should
  be running syslogReceiver.pl.

syslogReciever.pl:
  Listens on a network port (UDP/514) for incoming messages.
  Once received it decrypts them, optionally tracks message
  id's generated by syslogForwarder, optionally tracks new
  or missing hosts, and delivers the messages to the local
  syslog daemon (via /dev/log).
  


NOTES

SyslogReceiver
  * The port option of this script should be the same as the remote port
    option on syslogForwarder.pl.  I.E. If syslogForwarder.pl is sending
    to 192.168.1.1:1005, then syslogReceiver.pl needs to be listening for
    incoming messages on port 1005.
  * This script assumes you have syslogd running on the local server and 
    that it accepts incoming messages via /dev/log (it should automatically).
  * You must set a common hex pass-phrase in the top of both the syslogForwarder 
    syslogReciever scripts.
  * Message tracking works by watching the message ID (0-999) generated
    by the syslogForwarder script on the remote machine.  If syslogReceiver
    gets message #600, and then #615, it knows it's lost 14 messages, and
    an alert is generated and syslogged.

SyslogForwarder
  * The hostname and port options of this script should point to machine(s) running 
    syslogReciever.pl.
  * You must set a common hex pass-phrase in the top of both the syslogForwarder 
    syslogReciever scripts.
  * This script receives it's input from syslogd, so you must configure syslogd
    to send messages to the ip/port it's listening on, by editing your /etc/syslog.conf
    and adding a line like this:
      *.*   @192.168.15.165


INSTALLATION

syslogReceiver.pl on the central syslog server:

1. Copy syslogReciever.pl to /usr/local/sbin
2. Edit the pass-phrase in the top of the script.
   This pass-phrase needs to be the same in both 
   syslogForwarder.pl and syslogReceiver.pl!  Make
   sure you specify the pass-phrase in hex format!
   To generate a new password, try something like this:
     $ echo `ps axf` | md5sum
3. Start syslogReceiver.pl with a command like this:
   
   $ /usr/local/syslogReceiver.pl -d -p 514 
   
   or if you want syslogReciever to track message ID's 
   (if you need to know if a message is lost in transit)
   start it like this:
   
   $ /usr/local/syslogReceiver.pl -d -p 514 --track-messages
   
   or if you want to know when a host has not syslogged a
   message in 15 minutes start it like this:
   
   $ /usr/local/syslogReceiver.pl -d -p 514 --track-messages --track-hosts 15
   
   if you need to receive encrypted as well as non-encrypted 
   messages start it like this:
   
   $ /usr/local/syslogReceiver.pl -d -p 514 --accept-all
   

Remote workstation/server installation:

1. Copy syslogForwarder.pl to /usr/local/sbin
2. Edit the pass-phrase in the top of the script.
   This pass-phrase needs to be the same in both 
   syslogForwarder.pl and syslogReceiver.pl!  Make
   sure you specify the pass-phrase in hex format!
   To generate a new password, try something like this:
     $ echo `ps axf` | md5sum
3. Start syslogForwarder.pl with a command like this:
   
   $ /usr/local/syslogForwarder.pl -d syslogserver.company.com:514

4. Configure your local syslog daemon to send important messages
   to syslogForwarder on 127.0.0.2.  Add a line like this to 
   /etc/syslog.conf:
   
   # Send almost everything to syslogForwarder
   *.info;mail.none     @127.0.0.2

5. Tell syslogd to re-read it's configuration with a command like this:
   $ killall -HUP syslogd

