{"id":30275865,"url":"https://github.com/hexydec/fail2ban-rules","last_synced_at":"2026-02-08T21:07:27.526Z","repository":{"id":310087923,"uuid":"1038511876","full_name":"hexydec/fail2ban-rules","owner":"hexydec","description":"Useful fail2ban rules for mitigating malicious web traffic","archived":false,"fork":false,"pushed_at":"2025-08-15T15:57:02.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-15T17:45:15.700Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/hexydec.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,"zenodo":null}},"created_at":"2025-08-15T10:39:13.000Z","updated_at":"2025-08-15T15:57:05.000Z","dependencies_parsed_at":"2025-08-15T17:55:20.477Z","dependency_job_id":null,"html_url":"https://github.com/hexydec/fail2ban-rules","commit_stats":null,"previous_names":["hexydec/fail2ban-rules"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/hexydec/fail2ban-rules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexydec%2Ffail2ban-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexydec%2Ffail2ban-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexydec%2Ffail2ban-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexydec%2Ffail2ban-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hexydec","download_url":"https://codeload.github.com/hexydec/fail2ban-rules/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexydec%2Ffail2ban-rules/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270696745,"owners_count":24629897,"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","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-08-16T10:09:07.591Z","updated_at":"2026-02-08T21:07:27.507Z","avatar_url":"https://github.com/hexydec.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fail2ban Rules for Malicious Web Traffic\nUseful fail2ban rules for detecting and banning malicious web traffic using Nginx access logs in combined format.\n\n## Usage\nThe filters are placed in [src/filter.d/](src/filter.d/), copy these files into your fail2ban configuration folder, and then setup the required jails to use them.\n\n[Example jail configuration is provided](src/jail.conf), *note this is Plesk specific and will require tweaking to your setup*.\n\n## Filters\nHere is a list of the filter provided:\n\n### [nginx-404.conf](src/filter.d/nginx-404.conf)\nDetect `404` statuses, use this to ban IP's that generate many non-existent endpoints in quick succession. This pattern usually happens when malicious actors are probing URL's on your system looking for known weak endpoints, backup files, and other exploitable scripts. \n\n### [nginx-auth.conf](src/filter.d/nginx-auth.conf)\nDetect `401`/`403` status requests, this can be used for detecting brute-force attempts on secure pages or login scripts.\n\n### [nginx-badreqs.conf](src/filter.d/nginx-badreqs.conf)\nMatches specific URL patterns where the request resulted in a `404`. This will capture requests with keywords such as `admin`, `env`, or `backup` which are surrounded by [./_-] characters, e.g. `/.env`, `/wp-content/backup.sql`, or `/aws.yml`.\n\n### [nginx-excessive-post.conf](src/filter.d/nginx-excessive-post.conf)\nCaptures requests with `POST`, `PUT`, or `DELETE` methods, use this to limit the number that can be made within a certain period.\n\n### [nginx-excessive-reqs.conf](src/filter.d/nginx-excessive-reqs.conf)\nMatch excessive requests logged by nginx rate limiting from your error log to ban those IP's. \n\n### [nginx-limit-reqs.conf](src/filter.d/nginx-limit-reqs.conf)\nCaptures requests that returned a `429` status, to ban IP's that keep going over your configured rate limit. \n\n### [nginx-scrapers.conf](src/filter.d/nginx-scrapers.conf)\nUse this filter to ban user agents that have a generic scraper name such as `PostmanRuntime`, `Go-Http-Client`, `cURL`, or did not provide a User-Agent string at all.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexydec%2Ffail2ban-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexydec%2Ffail2ban-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexydec%2Ffail2ban-rules/lists"}