{"id":19871933,"url":"https://github.com/saltstack-formulas/fail2ban-formula","last_synced_at":"2025-04-05T19:13:14.372Z","repository":{"id":12939675,"uuid":"15617555","full_name":"saltstack-formulas/fail2ban-formula","owner":"saltstack-formulas","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-06T23:08:10.000Z","size":291,"stargazers_count":40,"open_issues_count":3,"forks_count":102,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-03-29T18:08:14.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html","language":"SaltStack","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saltstack-formulas.png","metadata":{"files":{"readme":"docs/README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-01-03T19:28:01.000Z","updated_at":"2023-06-13T11:57:35.000Z","dependencies_parsed_at":"2024-12-22T18:11:52.816Z","dependency_job_id":"f4603681-7453-48ea-acb7-7f28d2caed88","html_url":"https://github.com/saltstack-formulas/fail2ban-formula","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Ffail2ban-formula","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Ffail2ban-formula/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Ffail2ban-formula/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Ffail2ban-formula/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saltstack-formulas","download_url":"https://codeload.github.com/saltstack-formulas/fail2ban-formula/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247386265,"owners_count":20930619,"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":[],"created_at":"2024-11-12T16:14:00.958Z","updated_at":"2025-04-05T19:13:14.356Z","avatar_url":"https://github.com/saltstack-formulas.png","language":"SaltStack","funding_links":[],"categories":[],"sub_categories":[],"readme":".. _readme:\n\nfail2ban-formula\n================\n\n|img_travis| |img_sr|\n\n.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/fail2ban-formula.svg?branch=master\n   :alt: Travis CI Build Status\n   :scale: 100%\n   :target: https://travis-ci.com/saltstack-formulas/fail2ban-formula\n.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\n   :alt: Semantic Release\n   :scale: 100%\n   :target: https://github.com/semantic-release/semantic-release\n\n``fail2ban`` scans log files for malicious activity and executes actions based on what it finds.\n\n.. list-table::\n   :name: banner-breaking-changes-v1.0.0\n   :header-rows: 1\n   :widths: 1\n\n   * - WARNING: BREAKING CHANGES SINCE ``v1.0.0``\n   * - Prior to\n       `v1.0.0 \u003chttps://github.com/saltstack-formulas/fail2ban-formula/releases/tag/v1.0.0\u003e`_,\n       this formula provided two methods for managing Fail2Ban;\n       the old method under ``fail2ban`` and the new method under ``fail2ban.ng``.\n       The old method has now been removed and ``fail2ban.ng`` has been promoted to\n       be ``fail2ban`` in its place.\n\n       If you are not in a position to migrate, please pin your repo to the final\n       release tag before\n       `v1.0.0 \u003chttps://github.com/saltstack-formulas/fail2ban-formula/releases/tag/v1.0.0\u003e`_,\n       i.e.\n       `v0.17.2 \u003chttps://github.com/saltstack-formulas/fail2ban-formula/releases/tag/v0.17.2\u003e`_.\n\n       To migrate from ``fail2ban.ng``, simply modify your pillar to promote the\n       entire section under ``fail2ban:ng`` so that it is under ``fail2ban`` instead.\n       So with the editor of your choice, highlight the entire section and then\n       unindent one level.  Finish by removing the ``ng:`` line.\n\n       To migrate from the old ``fail2ban``, first convert to ``fail2ban.ng`` under\n       `v0.17.2 \u003chttps://github.com/saltstack-formulas/fail2ban-formula/releases/tag/v0.17.2\u003e`_.\n       and then follow the steps laid out in the paragraph directly above.\n\n.. contents:: **Table of Contents**\n\nGeneral notes\n-------------\n\nSee the full `SaltStack Formulas installation and usage instructions\n\u003chttps://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html\u003e`_.\n\nIf you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section\n\u003chttps://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas\u003e`_.\n\nIf you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,\nwhich contains the currently released version. This formula is versioned according to `Semantic Versioning \u003chttp://semver.org/\u003e`_.\n\nSee `Formula Versioning Section \u003chttps://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning\u003e`_ for more details.\n\nContributing to this repo\n-------------------------\n\n**Commit message formatting is significant!!**\n\nPlease see `How to contribute \u003chttps://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst\u003e`_ for more details.\n\nAvailable states\n----------------\n\n.. contents::\n   :local:\n\n``fail2ban``\n^^^^^^^^^^^^\n\nMeta state for inclusion of all states.\n\n``fail2ban.install``\n^^^^^^^^^^^^^^^^^^^^\n\nInstall the ``fail2ban`` package.\n\n``fail2ban.config``\n^^^^^^^^^^^^^^^^^^^\n\nConfigure fail2ban creating a ``jail.local`` file based on pillar data that overrid ``jail.conf``. It also creates a ``file.local`` per action/filter. Either in jails, actions or filters is possible to setup a ``source_path`` options to upload your configuration directly (see ``pillar.example``). It is also possible to remove either actions or filters setting up ``enabled: False`` in it section (see ``pillar.example``).\n\nIt is also possible to specify the source file for config, jails, actions and filters instead of using the template:\n\n.. code-block:: yaml\n\n  fail2ban:\n   config:\n     source_path: salt://path-to-fail2ban-config-file\n   jails:\n     source_path: salt://path-to-fail2ban-config-file\n   actions:\n     name-of-action:\n       config:\n         source_path: salt://path-to-action-file\n   filters:\n     name-of-filter:\n       config:\n         source_path: salt://path-to-filter-file\n\n``fail2ban.service``\n^^^^^^^^^^^^^^^^^^^^\n\nManage fail2ban service. It is also possible to disable the service using the following pillar configuration:\n\n.. code-block:: yaml\n\n  fail2ban:\n    enabled: false\n\n\nTesting\n-------\n\nLinux testing is done with ``kitchen-salt``.\n\nRequirements\n^^^^^^^^^^^^\n\n* Ruby\n* Docker\n\n.. code-block:: bash\n\n   $ gem install bundler\n   $ bundle install\n   $ bin/kitchen test [platform]\n\nWhere ``[platform]`` is the platform name defined in ``kitchen.yml``,\ne.g. ``debian-9-2019-2-py3``.\n\n``bin/kitchen converge``\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nCreates the docker instance and runs the ``fail2ban`` main state, ready for testing.\n\n``bin/kitchen verify``\n^^^^^^^^^^^^^^^^^^^^^^\n\nRuns the ``inspec`` tests on the actual instance.\n\n``bin/kitchen destroy``\n^^^^^^^^^^^^^^^^^^^^^^^\n\nRemoves the docker instance.\n\n``bin/kitchen test``\n^^^^^^^^^^^^^^^^^^^^\n\nRuns all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.\n\n``bin/kitchen login``\n^^^^^^^^^^^^^^^^^^^^^\n\nGives you SSH access to the instance for manual testing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltstack-formulas%2Ffail2ban-formula","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaltstack-formulas%2Ffail2ban-formula","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltstack-formulas%2Ffail2ban-formula/lists"}