All Projects → dj-wasabi → ansible-ossec-server

dj-wasabi / ansible-ossec-server

Licence: MIT License
Installing and maintaining the ossec-server for RedHat/Debian/Ubuntu.

Programming Languages

Jinja
831 projects
shell
77523 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ansible-ossec-server

ansible-kafka
Ansible role for installing and configuring Apache Kafka on RedHat and Debian platforms.
Stars: ✭ 56 (+93.1%)
Mutual labels:  ansible-role, molecule
Ansible Skeleton
The skeleton to create new ansible roles.
Stars: ✭ 5 (-82.76%)
Mutual labels:  ansible-role, molecule
Molecule Ansible Docker Aws
Example project showing how to test Ansible roles with Molecule using Testinfra and a multiscenario approach with Docker, Vagrant & AWS EC2 as infrastructure providers
Stars: ✭ 72 (+148.28%)
Mutual labels:  ansible-role, molecule
ansible-role-zerotier
Ansible role to install Zerotier-One and join a Zerotier network
Stars: ✭ 64 (+120.69%)
Mutual labels:  ansible-role
pvwa
Ansible role to deploy Cyberark Password Vault Web Access
Stars: ✭ 16 (-44.83%)
Mutual labels:  ansible-role
molecule-openstack
Molecule OpenStack Driver
Stars: ✭ 15 (-48.28%)
Mutual labels:  molecule
ansible-role-go
Ansible role - Go
Stars: ✭ 23 (-20.69%)
Mutual labels:  ansible-role
wazuh-cloudformation
Wazuh - Amazon AWS Cloudformation
Stars: ✭ 32 (+10.34%)
Mutual labels:  ossec
lykops
lykops是一套web可视化的运维自动化项目,基于python3+django开发的。可视化、简化执行ansible任务,并提供详细的任务执行报告。
Stars: ✭ 129 (+344.83%)
Mutual labels:  ansible-role
Ansible-Veeam
My Ansible Playbooks, Roles and Modules for Veeam
Stars: ✭ 21 (-27.59%)
Mutual labels:  ansible-role
ansible-role-k8s
This role render an arbitrary number of Jinja2 templates and deploys or removes them to/from Kubernetes clusters.
Stars: ✭ 26 (-10.34%)
Mutual labels:  ansible-role
ansible-haproxy
Ansible HAproxy role for Unified OpenStack Installer and others.
Stars: ✭ 35 (+20.69%)
Mutual labels:  molecule
ansible-role-docker-ce
Ansible role to install Docker CE on AlmaLinux/Rocky/CentOS/Fedora/RHEL(Redhat)/Ubuntu/Debian/Mint/Raspbian
Stars: ✭ 73 (+151.72%)
Mutual labels:  ansible-role
ansible-role-win updates
Install Windows updates using Ansible.
Stars: ✭ 24 (-17.24%)
Mutual labels:  ansible-role
CIS-Ubuntu-20.04-Ansible
Ansible Role to Automate CIS v1.1.0 Ubuntu Linux 18.04 LTS, 20.04 LTS Remediation
Stars: ✭ 150 (+417.24%)
Mutual labels:  ansible-role
ansible-role-dsvpn
Install and configure dsvpn on your system.
Stars: ✭ 18 (-37.93%)
Mutual labels:  molecule
ansible-github actions runner
Ansible Role to deploy GitHub Actions self-hosted runner
Stars: ✭ 76 (+162.07%)
Mutual labels:  ansible-role
ansible-digitalocean
An ansible role that creates a DigitalOcean droplet and returns the droplet's IP address for further use in playbooks
Stars: ✭ 20 (-31.03%)
Mutual labels:  ansible-role
ansible-coredns
Ansible provisioning of CoreDNS
Stars: ✭ 25 (-13.79%)
Mutual labels:  molecule
nodejs
Ansible role for nodejs
Stars: ✭ 21 (-27.59%)
Mutual labels:  ansible-role

ansible-ossec-server

This role will install the ossec server on a host.

Build Status:

Build Status

Requirements

This role will work on:

  • Red Hat
  • Debian
  • Ubuntu
  • Amazon Linux (2)

So, you'll need one of those operating systems.. :-)

Role Variables

This role has some variables which you can or need to override.

ossec_server_atomic_release: 1.0-21
ossec_server_config: []
ossec_agent_configs: []

Example setup

Edit the vars file for the host which runs the ossec-server:

host_vars/ossec-server

install_postfix: true
postfix_mydomain: email-smtp.us-west-1.amazonaws.com
postfix_sasl_passwds:
  - "[email-smtp.us-west-1.amazonaws.com]:587 USERNAME:PASSWORD
postfix_relayhost: false
postfix_mynetworks: false
postfix_myhostname: localhost
postfix_domain: localhost
postfix_additional_settings:
  relayhost: "[email-smtp.us-west-1.amazonaws.com]:587"

ossec_server_config:
  mail_to:
    - [email protected]
  mail_smtp_server: localhost
  mail_from: [email protected]
  frequency_check: 72000
  ignore_files:
    - /etc/mtab
    - /etc/mnttab
    - /etc/hosts.deny
  directories:
    - check_all: 'yes'
      dirs: /etc,/usr/bin,/usr/sbin
    - check_all: 'yes'
      dirs: /bin,/sbin
  localfiles:
    - format: 'syslog'
      location: '/var/log/messages'
    - format: 'syslog'
      location: '/var/log/secure'
  globals:
    - '127.0.0.1'
    - '192.168.2.1'
  connection: 'secure'
  log_level: 1
  email_level: 7
  commands:
    - name: 'host-deny'
      executable: 'host-deny.sh'
      expect: 'srcip'
      timeout_allowed: 'yes'
  active_responses:
    - command: 'host-deny'
      location: 'local'
      level: 6
      timeout: 600
  localfiles:
    - format: 'syslog'
      location: '/var/log/messages'
    - format: 'syslog'
      location: '/var/log/secure'

ossec_agent_configs:
  - type: os
    type_value: linux
    frequency_check: 79200
    ignore_files:
      - /etc/mtab
      - /etc/mnttab
      - /etc/hosts.deny
      - /etc/mail/statistics
      - /etc/svc/volatile
    directories:
      - check_all: 'yes'
        dirs: /etc,/usr/bin,/usr/sbin
      - check_all: 'yes'
        dirs: /bin,/sbin
    localfiles:
      - format: 'syslog'
        location: '/var/log/messages'
      - format: 'syslog'
        location: '/var/log/secure'
      - format: 'syslog'
        location: '/var/log/maillog'
      - format: 'apache'
        location: '/var/log/httpd/error_log'
      - format: 'apache'
        location: '/var/log/httpd/access_log'
      - format: 'apache'
        location: '/var/ossec/logs/active-responses.log'

ossec_server_config:

At first, there is the server configuration. Change it for your needs, as this default setup won't do any good for you. (You don't have access to use the mail.example.com mailhost. :-))

ossec_agent_configs:

http://ossec-docs.readthedocs.org/en/latest/manual/agent/agent-configuration.html

There are 3 "types":

  • os
  • name
  • profile

In the above setup, the type is os. And this configuration is for the "linux" os. You can have several types configured in the host_vars file, so you can create all kind of different configs.

You can find here some more information about the ossec shared agent configuration: http://ossec-docs.readthedocs.org/en/latest/manual/syscheck/

<role>/vars/main.yml

nil

Dependencies

No dependencies.

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: ossec-server.example.com
  roles:
     - { role: dj-wasabi.ossec-server }

Molecule

This roles is configured to be tested with Molecule. You can find on this page some more information regarding Molecule: https://werner-dijkerman.nl/2016/07/10/testing-ansible-roles-with-molecule-testinfra-and-docker/ Molecule will boot 2 docker containers, containing the following OS:

  • Debian 8
  • CentOS 7

License

GPLv3

Author Information

Please send suggestion or pull requests to make this role better.

Github: https://github.com/dj-wasabi/ansible-ossec-server

mail: ikben [ at ] werner-dijkerman . nl

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].