No description
Find a file
2018-11-29 19:22:23 +01:00
defaults first version 2018-08-06 22:43:51 +02:00
handlers first version 2018-08-06 22:43:51 +02:00
meta chore: use new docker image for the tests 2018-08-28 08:36:46 +02:00
tasks first version 2018-08-06 22:43:51 +02:00
templates fix: add new line in template for ignore command 2018-08-26 10:03:59 +02:00
test/integration feat: add travis test 2018-08-10 23:33:35 +02:00
.gitignore first version 2018-08-06 22:43:51 +02:00
.kitchen.yml chore: use new docker image for the tests 2018-08-28 08:36:46 +02:00
.rubocop.yml feat: add travis test 2018-08-10 23:33:35 +02:00
.travis.yml chore: use new docker image for the tests 2018-08-28 08:36:46 +02:00
CHANGELOG.md style: change changelog 2018-11-29 19:22:23 +01:00
Gemfile first version 2018-08-06 22:43:51 +02:00
Gemfile.lock first version 2018-08-06 22:43:51 +02:00
LICENSE first version 2018-08-06 22:43:51 +02:00
README.md release: version to 1.0.1 2018-08-28 08:38:07 +02:00

Ansible role: Fail2ban

Version Build Status License

Install and configure Fail2ban

Requirements

  • Ansible >= 2.4
  • Debian Stretch

Role variables

  • fail2ban_blocktype - iptable policy for an ip banned (default: DROP)
  • fail2ban_bantime - default ban time in second (default: 600)
  • fail2ban_findtime - default find time in second to count the retries (default: 600)
  • fail2ban_maxretry - default max retry before a ban (default: 6)
  • fail2ban_ignoreip - array with the ips ignored
  • fail2ban_filters - array with custom filters
  - name: web
    failregex: Login failed.*Remote IP.*'<HOST>' 
  • fail2ban_jails - array with the jails to enable
  - name: web
    logpath: /var/log/web.log
    filter: web
    port: 80,443
    additional:
      maxretry: 3
      bantime: 3600

How to use

  • Install:
- hosts: server
  roles:
    - fail2ban

Development

Tests with docker

  • install docker
  • install ruby
  • install bundler gem install bundler
  • install dependencies bundle install
  • run the tests kitchen test

License

Copyright (c) 2018 Adrien Waksberg

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.