{"id":23157903,"url":"https://github.com/filipnet/fail2ban-ops","last_synced_at":"2026-04-24T16:33:54.254Z","repository":{"id":267976119,"uuid":"902934599","full_name":"filipnet/fail2ban-ops","owner":"filipnet","description":"fail2ban-ops is a collection of scripts designed to assist with the management, monitoring, and automation of Fail2Ban. These tools allow system administrators to easily check the status of Fail2Ban jails, unban IP addresses, and analyze blocked IP statistics in a firewall environment. ","archived":false,"fork":false,"pushed_at":"2024-12-14T06:51:15.000Z","size":251,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T18:24:32.265Z","etag":null,"topics":["automation","bash-script","fail2ban","fail2ban-tools","firewall-management","firewalld","ip-blocking","security","security-tools","server-security","unban-ip"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/filipnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2024-12-13T15:16:02.000Z","updated_at":"2024-12-14T06:51:19.000Z","dependencies_parsed_at":"2024-12-13T17:18:22.731Z","dependency_job_id":"11be9575-54f0-47c7-8868-7a5e52ef1cbf","html_url":"https://github.com/filipnet/fail2ban-ops","commit_stats":null,"previous_names":["filipnet/fail2ban-ops"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/filipnet/fail2ban-ops","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipnet%2Ffail2ban-ops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipnet%2Ffail2ban-ops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipnet%2Ffail2ban-ops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipnet%2Ffail2ban-ops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filipnet","download_url":"https://codeload.github.com/filipnet/fail2ban-ops/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipnet%2Ffail2ban-ops/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32230992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T13:21:15.438Z","status":"ssl_error","status_checked_at":"2026-04-24T13:21:15.005Z","response_time":64,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["automation","bash-script","fail2ban","fail2ban-tools","firewall-management","firewalld","ip-blocking","security","security-tools","server-security","unban-ip"],"created_at":"2024-12-17T22:16:16.205Z","updated_at":"2026-04-24T16:33:54.224Z","avatar_url":"https://github.com/filipnet.png","language":"Shell","readme":"# fail2ban-ops\n\u003cimg src=\"images/logo.webp\" alt=\"Logo\" width=\"30%\" align=\"right\" hspace=\"30\" vspace=\"20\"/\u003e\nfail2ban-ops is a collection of scripts designed to assist with the management, monitoring, and automation of Fail2Ban. These tools allow system administrators to easily check the status of Fail2Ban jails, unban IP addresses, and analyze blocked IP statistics in a firewall environment. \n\n\u003c!-- TOC --\u003e\n\n- [fail2ban-ops](#fail2ban-ops)\n    - [Features](#features)\n    - [Prerequisites](#prerequisites)\n    - [Installation](#installation)\n    - [Usage](#usage)\n        - [fail2ban-ops-status.sh](#fail2ban-ops-statussh)\n        - [fail2ban-ops-unban.sh](#fail2ban-ops-unbansh)\n        - [fail2ban-ops-stats.sh](#fail2ban-ops-statssh)\n    - [Contributing](#contributing)\n    - [License](#license)\n\n\u003c!-- /TOC --\u003e\n\n## Features\n- Check the status of Fail2Ban jails and banned IPs.\n- Remove an IP address or DNS-resolved IPs from a Fail2Ban jail.\n- Analyze and display blocked IP statistics from firewall logs.\n\n## Prerequisites\n- Bash\n- Fail2Ban\n- Firewall with firewalld (for stats script)\n\n## Installation\nClone the repository to your local machine:\n\n```bash\ngit clone https://github.com/filipnet/fail2ban-ops.git\ncd fail2ban-ops\nchmod +x fail2ban-ops-*\n```\n\n## Usage\n\n### fail2ban-ops-status.sh\nChecks the status of Fail2Ban jails and lists banned IP addresses.\n\n```bash\n./fail2ban-ops-status.sh\n```\n\n### fail2ban-ops-unban.sh\nRemoves an IP address (IPv4/IPv6) or DNS-resolved IPs from a Fail2Ban jail.\n\n```bash\n./fail2ban-ops-unban.sh \u003cIP/Hostname\u003e \u003cJail-Name\u003e\n```\n\nExample: Prevent Locking Yourself Out with Dynamic PPPoE IPs\n\nIf you are using a dynamic IP address (e.g., assigned via PPPoE from your ISP), Fail2Ban may occasionally block your own IP due to false-positive detections. To prevent permanently locking yourself out of your server, you can use the fail2ban-ops-unban.sh script to periodically unban your IP. This works by targeting a dynamic DNS hostname that always resolves to your current public IP.\n\nCron Job Example (runs every 5 minutes):\n\n```bash\n*/5 * * * * /root/fail2ban-ops/fail2ban-ops-unban.sh your-hostname.dyndns.org portscan \u003e/dev/null 2\u003e\u00261\n```\nThis ensures that your current IP, even when dynamically assigned, is regularly removed from the specified Fail2Ban jail (e.g., portscan), preventing accidental lockouts.\n\n### fail2ban-ops-stats.sh\nAnalyzes and displays blocked IP statistics from firewall logs based on Fail2Ban activity.\n\n```bash\n./fail2ban-ops-stats.sh\n```\n\n## Contributing\nContributions are welcome! Feel free to submit a pull request or open an issue for any bugs or feature requests.\n\n## License\nfail2ban-ops and all individual scripts are under the BSD 3-Clause license unless explicitly noted otherwise. Please refer to the [LICENSE](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipnet%2Ffail2ban-ops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilipnet%2Ffail2ban-ops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipnet%2Ffail2ban-ops/lists"}