{"id":15013981,"url":"https://github.com/voxpupuli/puppet-fail2ban","last_synced_at":"2025-04-04T21:08:34.043Z","repository":{"id":2553506,"uuid":"2642219","full_name":"voxpupuli/puppet-fail2ban","owner":"voxpupuli","description":"This module installs, configures and manages the Fail2ban service.","archived":false,"fork":false,"pushed_at":"2025-03-19T13:12:54.000Z","size":538,"stargazers_count":32,"open_issues_count":17,"forks_count":106,"subscribers_count":47,"default_branch":"master","last_synced_at":"2025-03-19T13:18:40.154Z","etag":null,"topics":["centos-puppet-module","debian-puppet-module","hacktoberfest","linux-puppet-module","opensuse-puppet-module","puppet","redhat-puppet-module","ubuntu-puppet-module"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2011-10-25T08:55:50.000Z","updated_at":"2025-02-07T15:24:18.000Z","dependencies_parsed_at":"2024-04-09T17:23:22.348Z","dependency_job_id":"044a9f1d-d5f7-4ca5-90f5-693dc2a70404","html_url":"https://github.com/voxpupuli/puppet-fail2ban","commit_stats":{"total_commits":285,"total_committers":44,"mean_commits":"6.4772727272727275","dds":0.6736842105263158,"last_synced_commit":"7a33d2ed0391638921004841d7b54ecdae3a76a0"},"previous_names":["dhoppe/puppet-fail2ban"],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-fail2ban","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-fail2ban/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-fail2ban/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-fail2ban/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-fail2ban/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249526,"owners_count":20908212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["centos-puppet-module","debian-puppet-module","hacktoberfest","linux-puppet-module","opensuse-puppet-module","puppet","redhat-puppet-module","ubuntu-puppet-module"],"created_at":"2024-09-24T19:45:01.713Z","updated_at":"2025-04-04T21:08:34.018Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"# fail2ban\n\n[![Build Status](https://travis-ci.org/voxpupuli/puppet-fail2ban.png?branch=master)](https://travis-ci.org/voxpupuli/puppet-fail2ban)\n[![Code Coverage](https://coveralls.io/repos/github/voxpupuli/puppet-fail2ban/badge.svg?branch=master)](https://coveralls.io/github/voxpupuli/puppet-fail2ban)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/fail2ban.svg)](https://forge.puppetlabs.com/puppet/fail2ban)\n[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/fail2ban.svg)](https://forge.puppetlabs.com/puppet/fail2ban)\n[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/fail2ban.svg)](https://forge.puppetlabs.com/puppet/fail2ban)\n[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/fail2ban.svg)](https://forge.puppetlabs.com/puppet/fail2ban)\n\n## Table of Contents\n\n1. [Overview](#overview)\n1. [Module Description - What the module does and why it is useful](#module-description)\n1. [Setup - The basics of getting started with fail2ban](#setup)\n    * [What fail2ban affects](#what-fail2ban-affects)\n    * [Beginning with fail2ban](#beginning-with-fail2ban)\n1. [Usage - Configuration options and additional functionality](#usage)\n1. [Reference - An under-the-hood peek at what the module is doing and how](#reference)\n1. [Limitations - OS compatibility, etc.](#limitations)\n1. [Jails available](#jails-available)\n    * [Pre-defined jails](#pre-defined-jails)\n    * [Custom jails](#custom-jails)\n1. [Development - Guide for contributing to the module](#development)\n\n## Overview\n\nThis module installs, configures and manages the Fail2ban service.\n\n## Module Description\n\nThis module handles installing, configuring and running Fail2ban across a range of\noperating systems and distributions.\n\n## Setup\n\n### What fail2ban affects\n\n* fail2ban package.\n* fail2ban configuration file.\n* fail2ban service.\n\n\n### Beginning with fail2ban\n\nInstall and configure `fail2ban`:\n\n```puppet\n    class { 'fail2ban': }\n```\n\n### Config file template\n\nYou can also manually specify a different configuration template. To do it, use\nyour desired configuration template (e.g. if your template is in your local profile):\n\n```puppet\n  class { 'fail2ban':\n    config_file_template =\u003e \"profile/fail2ban/etc/fail2ban/jail.conf.epp\"\n  }\n```\n\nOr using Hiera:\n\n```hiera\nfail2ban::config_file_template: \"profile/fail2ban/etc/fail2ban/jail.conf.epp\"\n```\n\n## Usage\n\nUpdate the fail2ban package.\n\n```puppet\n    class { 'fail2ban':\n      package_ensure =\u003e 'latest',\n    }\n```\n\nRemove the fail2ban package.\n\n```puppet\n    class { 'fail2ban':\n      package_ensure =\u003e 'absent',\n    }\n```\n\nPurge the fail2ban package ***(All configuration files will be removed)***.\n\n```puppet\n    class { 'fail2ban':\n      package_ensure =\u003e 'purged',\n    }\n```\n\nDeploy the configuration files from source directory.\n\n```puppet\n    class { 'fail2ban':\n      config_dir_source =\u003e \"puppet:///modules/profile/fail2ban/etc/fail2ban\",\n    }\n```\n\nDeploy the configuration files from source directory ***(Unmanaged configuration\nfiles will be removed)***.\n\n```puppet\n    class { 'fail2ban':\n      config_dir_purge  =\u003e true,\n      config_dir_source =\u003e \"puppet:///modules/profile/fail2ban/etc/fail2ban\",\n    }\n```\n\nDeploy the configuration file from source.\n\n```puppet\n    class { 'fail2ban':\n      config_file_source =\u003e \"puppet:///modules/profile/fail2ban/etc/fail2ban/jail.conf\",\n    }\n```\n\nDeploy the configuration file from string.\n\n```puppet\n    class { 'fail2ban':\n      config_file_string =\u003e '# THIS FILE IS MANAGED BY PUPPET',\n    }\n```\n\nDeploy the configuration file from template.\n\n```puppet\n    class { 'fail2ban':\n      config_file_template =\u003e \"profile/fail2ban/etc/fail2ban/jail.conf.epp\",\n    }\n```\n\nDeploy the configuration file from custom template ***(Additional parameters can\nbe defined)***.\n\n```puppet\n    class { 'fail2ban':\n      config_file_template     =\u003e \"profile/fail2ban/etc/fail2ban/jail.conf.epp\",\n      config_file_options_hash =\u003e {\n        'key' =\u003e 'value',\n      },\n    }\n```\n\nDeploy additional configuration files from source, string or template.\n\n```puppet\n    class { 'fail2ban':\n      config_file_hash =\u003e {\n        'jail.2nd.conf' =\u003e {\n          config_file_path   =\u003e '/etc/fail2ban/jail.2nd.conf',\n          config_file_source =\u003e \"puppet:///modules/profile/fail2ban/etc/fail2ban/jail.2nd.conf\",\n        },\n        'jail.3rd.conf' =\u003e {\n          config_file_path   =\u003e '/etc/fail2ban/jail.3rd.conf',\n          config_file_string =\u003e '# THIS FILE IS MANAGED BY PUPPET',\n        },\n        'jail.4th.conf' =\u003e {\n          config_file_path     =\u003e '/etc/fail2ban/jail.4th.conf',\n          config_file_template =\u003e \"profile/fail2ban/etc/fail2ban/jail.4th.conf.epp\",\n        },\n      },\n    }\n```\n\nDisable the fail2ban service.\n\n```puppet\n    class { 'fail2ban':\n      service_ensure =\u003e 'stopped',\n    }\n```\n\n## Jails available\n\n### Pre-defined jails\n\n#### RedHat\n\n* 3proxy\n* apache-auth\n* apache-badbots\n* apache-botsearch\n* apache-fakegooglebot\n* apache-modsecurity\n* apache-nohome\n* apache-noscript\n* apache-overflows\n* apache-shellshock\n* assp\n* asterisk\n* counter-strike\n* courier-auth\n* courier-smtp\n* cyrus-imap\n* directadmin\n* dovecot\n* dropbear\n* drupal-auth\n* ejabberd-auth\n* exim\n* exim-spam\n* freeswitch\n* froxlor-auth\n* groupoffice\n* gssftpd\n* guacamole\n* horde\n* kerio\n* lighttpd-auth\n* monit\n* mysqld-auth\n* nagios\n* named-refused\n* nginx-botsearch\n* nginx-http-auth\n* nsd\n* openwebmail\n* oracleims\n* pam-generic\n* pass2allow-ftp\n* perdition\n* php-url-fopen\n* portsentry\n* postfix\n* postfix-rbl\n* postfix-sasl\n* proftpd\n* pure-ftpd\n* qmail-rbl\n* recidive\n* roundcube-auth\n* selinux-ssh\n* sendmail-auth\n* sendmail-reject\n* sieve\n* sogo-auth\n* solid-pop3d\n* squid\n* squirrelmail\n* sshd\n* sshd-ddos\n* stunnel\n* suhosin\n* tine20\n* uwimap-auth\n* vsftpd\n* webmin-auth\n* wuftpd\n* xinetd-fail\n\n#### Debian\n\n* 3proxy\n* apache-auth\n* apache-badbots\n* apache-botsearch\n* apache-fakegooglebot\n* apache-modsecurity\n* apache-multiport\n* apache-nohome\n* apache-noscript\n* apache-overflows\n* apache-shellshock\n* assp\n* asterisk\n* bitwarden\n* centreon\n* counter-strike\n* courierauth\n* courier-smtp\n* cyrus-imap\n* directadmin\n* domino-smtp\n* dovecot\n* dropbear\n* drupal-auth\n* ejabberd-auth\n* exim\n* exim-spam\n* freeswitch\n* froxlor-auth\n* groupoffice\n* gssftpd\n* guacamole\n* haproxy-http-auth\n* horde\n* kerio\n* lighttpd-auth\n* lighttpd-fastcgi\n* mongodb-auth\n* monit\n* murmur\n* mysqld-auth\n* nagios\n* named-refused\n* nginx-botsearch\n* nginx-http-auth\n* nginx-limit-req\n* nsd\n* openhab-auth\n* openwebmail\n* oracleims\n* pam-generic\n* pass2allow-ftp\n* perdition\n* php-url-fopen\n* phpmyadmin-syslog\n* portsentry\n* postfix\n* postfix-rbl\n* postfix-sasl\n* proftpd\n* pure-ftpd\n* qmail-rbl\n* recidive\n* roundcube-auth\n* sasl\n* selinux-ssh\n* sendmail-auth\n* sendmail-reject\n* sieve\n* screensharing\n* slapd\n* sogo-auth\n* solid-pop3d\n* squid\n* squirrelmail\n* ssh\n* ssh-blocklist\n* ssh-ddos\n* ssh-iptables-ipset4\n* ssh-iptables-ipset6\n* ssh-route\n* stunnel\n* suhosin\n* tine20\n* traefik-auth\n* uwimap-auth\n* vsftpd\n* webmin-auth\n* wuftpd\n* xinetd-fail\n* zoneminder\n* znc-adminlog\n\n#### Suse\n\n* 3proxy\n* apache-auth\n* apache-badbots\n* apache-botsearch\n* apache-common\n* apache-fakegooglebot\n* apache-modsecurity\n* apache-nohome\n* apache-noscript\n* apache-overflows\n* apache-pass\n* apache-shellshock\n* assp\n* asterisk\n* botsearch-common\n* common\n* counter-strike\n* courier-auth\n* courier-smtp\n* cyrus-imap\n* directadmin\n* domino-smtp\n* dovecot\n* dropbear\n* drupal-auth\n* ejabberd-auth\n* exim-common\n* exim-spam\n* exim\n* freeswitch\n* froxlor-auth\n* groupoffice\n* gssftpd\n* guacamole\n* haproxy-http-auth\n* horde\n* ignorecommands\n* kerio\n* lighttpd-auth\n* mongodb-auth\n* monit\n* murmur\n* mysqld-auth\n* nagios\n* named-refused\n* nginx-botsearch\n* nginx-http-auth\n* nginx-limit-req\n* nsd\n* openhab\n* openwebmail\n* oracleims\n* pam-generic\n* perdition\n* php-url-fopen\n* phpmyadmin-syslog\n* portsentry\n* postfix\n* proftpd\n* pure-ftpd\n* qmail\n* recidive\n* roundcube-auth\n* screensharingd\n* selinux-common\n* selinux-ssh\n* sendmail-auth\n* sendmail-reject\n* sieve\n* slapd\n* sogo-auth\n* solid-pop3d\n* squid\n* squirrelmail\n* sshd\n* stunnel\n* suhosin\n* tine20\n* uwimap-auth\n* vsftpd\n* webmin-auth\n* wuftpd\n* xinetd-fail\n* zoneminder\n\n### Custom jails\n\nUsers can add their own jails by using this YAML definition:\n\n```yaml\n---\n  fail2ban::custom_jails:\n    'nginx-wp-login':\n      filter_failregex: '\u003cHOST\u003e.*] \"POST /wp-login.php'\n      port: 'http,https'\n      logpath: '/var/log/nginx/access.log'\n      maxretry: 3\n      findtime: 120\n      bantime: 1200\n      ignoreip: ['127.0.0.1', '192.168.1.1/24']\n    'nginx-login':\n      filter_failregex: '^\u003cHOST\u003e -.*POST /sessions HTTP/1\\..\" 200'\n      action: 'iptables-multiport[name=NoLoginFailures, port=\"http,https\"]'\n      logpath: '/var/log/nginx*/*access*.log'\n      maxretry: 6\n      bantime: 600\n      ignoreip: ['127.0.0.1', '192.168.1.1/24']\n```\n\n### Sendmail notifications\n\nDefault e-mail notification are defined in `/etc/fail2ban/action.d/sendmail-common.conf`. Following configuration will create override config `sendmail-common.local`.\n\n```yaml\nfail2ban::sendmail_actions:\n  actionstart: ''\n  actionstop: ''\nfail2ban::sendmail_config:\n  dest: root@localhost\n  sender: fail2ban@localhost\n  sendername: Fail2Ban\n```\n\n## Limitations\n\nSupported OSes and dependencies are given into metadata.json file.\n\n## Development\n\n### Bug Report\n\nIf you find a bug, have trouble following the documentation or have a question\nabout this module - please create an issue.\n\n### Pull Request\n\nIf you are able to patch the bug or add the feature yourself - please make a\npull request.\n\n### Contributors\n\nThe list of contributors can be found at: [https://github.com/voxpupuli/puppet-fail2ban/graphs/contributors](https://github.com/voxpupuli/puppet-fail2ban/graphs/contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-fail2ban","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-fail2ban","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-fail2ban/lists"}