Skip to content

Installs Fail2Ban from source on Debian/Ubuntu linux servers.

License

Notifications You must be signed in to change notification settings

mhmtkcn/ansible-role-fail2ban

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: Install Fail2Ban

Build Status

Installs Fail2Ban from source on Debian/Ubuntu linux servers.

Requirements

None

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

fail2ban_download_url: 'https://github.com/fail2ban/fail2ban/archive/0.9.3.tar.gz'
fail2ban_workspace: '/opt'

fail2ban_jail_dir: '/etc/fail2ban/jail.d'

fail2ban_apt_packages:
  - whois
  - iptables-persistent

Dependencies

None.

Installation

$ ansible-galaxy install tschifftner.fail2ban

Example Playbook

- hosts: server

  vars:
    # Ignore all own ips
    fail2ban_ignoreip: "{{ ansible_all_ipv4_addresses }}"
      
    fail2ban_jails:
      - name: 'ssh'
        enabled: true
        port: ssh
        filter: sshd
        logpath: /var/log/auth.log
        maxretry: 3
    
      - name: 'ssh-ddos'
        enabled: true
        port: ssh
        bantime: 86400
        filter: 'sshd-ddos'
        logpath: /var/log/auth.log
        maxretry: 6

  roles:
    - { role: tschifftner.fail2ban }

Supported OS

Ansible Debian Jessie Ubuntu 14.04
2.1 Yes Yes

License

MIT License

Author Information

About

Installs Fail2Ban from source on Debian/Ubuntu linux servers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%