Skip to Content
Security Automation with Ansible 2
book

Security Automation with Ansible 2

by Akash Mahajan, MADHU AKULA
December 2017
Intermediate to advanced
364 pages
7h 30m
English
Packt Publishing
Content preview from Security Automation with Ansible 2

Logstash configuration

To receive logs from different systems, we use the Beats service from Elastic. The following configuration is to receive logs from different servers to the Logstash server. Logstash runs on port 5044 and we can use SSL certificates to ensure logs are transferred via an encrypted channel:

# 02-beats-input.conf.j2input {    beats {        port => 5044        ssl => true        ssl_certificate => "/etc/pki/tls/certs/logstash-forwarder.crt"        ssl_key => "/etc/pki/tls/private/logstash-forwarder.key"    }}

The following configuration is to parse the system SSH service logs (auth.log) using grok filters. It also applies filters like geoip, while providing additional information like country, location, longitude, latitude, and so on:

#10-sshlog-filter.conf.j2 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Implementing DevOps with Ansible 2

Implementing DevOps with Ansible 2

Jonathan McAllister
Practical Ansible 2

Practical Ansible 2

Daniel Oh, James Freeman, Fabio Alessandro Locati

Publisher Resources

ISBN: 9781788394512Supplemental Content