Basic OSSEC server, webui and agent configuration
From Notes_Wiki
<yambe:breadcrumb>OSSEC|OSSEC</yambe:breadcrumb>
Basic OSSEC server, webui and agent configuration
Configure OSSEC server
To configure OSSEC server use following steps:
- yum -y install gcc postgresql-devel mysql-devel
- Download latest OSSEC Server/Agent from http://www.ossec.net
- Extract server code using 'tar xzf ossec-hids-*'
- Go to server code directory 'cd ossec-hids*'
- Install using './install.sh' and use all default values suggested. For installation type use 'server'.
- Check status using '/var/ossec/bin/ossec-control status'. If ossec is not running then start it using '/var/ossec/bin/ossec-control start'
Configure OSSEC Web UI
To configure OSSEC web UI use following steps:
- Install OSSEC server as mentioned in previous section.
- Download latest OSSEC Web UI code from http://www.ossec.net
- Extract web UI code
- Rename and move the extracted folder to '/var/www/html/ossec'
- Go to OSSEC Web UI folder 'cd /var/www/html/ossec'
- Run './setup.sh'
- Restart apache using 'service httpd restart'
- Enable apache to run on start-up using 'chkconfig httpd on'
- Access the OSSEC interface at http://<Server-IP>/ossec
Configure OSSEC Agent on Linux machine
To configure OSSEC Agent on Linux machine use same steps as that for configuring OSSEC server with the only difference in installation type value. Instead of choosing 'server' choose 'agent'. Also edit '/var/ossec/etc/ossec.conf' and enter correct IP address of server.
Add OSSEC agent to OSSEC server
To add OSSEC agent to OSSEC server use following steps:
- On server do following:
- Ensure that incoming connections to UDP 1514 to server from agent are allowed.
- Run '/var/ossec/bin/manage_agents'
- Add agent and extract its key
- Restart ossec using '/var/ossec/bin/ossec-control restart'
- On client do following:
- Run '/var/ossec/bin/manage_agents'
- Add key extracted from server
- Restart agent on client using '/var/ossec/bin/ossec-control restart'
- Open Web UI on server to verify that agent has connected successfully.
<yambe:breadcrumb>OSSEC|OSSEC</yambe:breadcrumb>