This module manages OSSEC server and client configuration through Puppet
This should be a randomly generated string of characters, and params.pp should
have permissions set such that only the puppet
user and read/write the file.
One could use openssl rand -base64 12
to generate the client_seed.
This is the base directory of your OSSEC installation. The default location for this
puppet module is /var/lib/ossec
and likely needs to be modified as by default OSSEC
installs into /var/ossec
.
To install ossec as a server or client:
node 'ossec' {
class { "ossec::server": }
}
node 'client' {
class { "ossec::client": }
}
Declaring the ossec::server
or ossec::client
class will install ossec, however
it will still need to be configured for your environment, this is managed by
the ossec::config::*
classes and defined types.
Client Configuration:
The ossec::config::client
class manages the client configuration. 4 paramaters
are available, server_ip
, server_hostname
, server_port
, and notify_time
.
Of these either server_ip
or server_hostname
are required.
class { "ossec::config::client":
server_ip => '1.1.1.1'
}
Server Configuration:
The ossec::server
configuration is managed by numerous types, see the
Configuration types below, but at a minimum you'll want to define the
ossec::config::global
values to setup email notifications.
class { "ossec::config::global":
email_to => 'ossec@ossec.org',
smtp_server => 'smtp.ossec.org',
}
Install and configure OSSEC server. The following parameters are available:
enable_db
= true|false
enable_debug
= true|false
enable_agentless
= true|false
enable_csyslog
= true|false
Install and configure OSSEC client/agents
Puppet type: defined type
Configure agentless options
Configure alerts
Configure the client
Configure commands
Configure database type and options
Configure email options
Configure global server options
class { "ossec::config::global": email_to => "systems@ossec.org" }
Configure local files to monitor
ossec::config::localfile { "/var/log/messages": }
Configure remote options
Configure reports
Configure rootcheck options
Configure rules, order
is required.
ossec::config::rules { "pam_rules.xml": order => '2' }
Configure syscheck options
class { "ossec::config::syscheck": alert_new_files => 'yes' }
Configure syscheck directories to monitor
ossec::config::syscheck::dir { "/etc": report_changes => 'yes' }
ossec::config::syscheck::dir { "/bin": }
Configure syscheck directories and files to ignore
ossec::config::syscheck::ignore { "/etc/mtab": }
Configure syslog options