{"id":15517278,"url":"https://github.com/skx/mod_blacklist","last_synced_at":"2026-03-16T20:02:09.039Z","repository":{"id":150430292,"uuid":"77011691","full_name":"skx/mod_blacklist","owner":"skx","description":"A simple Apache module to blacklist remote hosts.","archived":false,"fork":false,"pushed_at":"2018-08-20T16:14:30.000Z","size":9,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T21:51:09.266Z","etag":null,"topics":["apache2","blacklist","c","firewall","security"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-12-21T03:16:36.000Z","updated_at":"2025-02-10T08:45:32.000Z","dependencies_parsed_at":"2023-04-24T17:27:20.293Z","dependency_job_id":null,"html_url":"https://github.com/skx/mod_blacklist","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Fmod_blacklist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Fmod_blacklist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Fmod_blacklist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skx%2Fmod_blacklist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skx","download_url":"https://codeload.github.com/skx/mod_blacklist/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366685,"owners_count":21418768,"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":["apache2","blacklist","c","firewall","security"],"created_at":"2024-10-02T10:12:20.430Z","updated_at":"2026-03-16T20:02:03.999Z","avatar_url":"https://github.com/skx.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"mod_blacklist\n-------------\n\nA simple Apache 2 module to blacklist remote visitors, by IP address.\n\n\nLinks\n-----\n\n* Github\n   * https://github.com/skx/mod_blacklist\n\n\nAbout\n-----\n\nThis is a simple Apache module which will perform an ACL check on each incoming HTTP request.  If the remote visitor has been blacklisted each access will result in a `403` forbidden response.\n\nAccess is tested, trivially, via a lookup of their remote IP address in a particular directory, which defaults to `/etc/blacklist.d/`.\n\nFor example to blacklist the remote IP 1.2.3.4:\n\n    touch /etc/blacklist.d/1.2.3.4\n\nThis is 100% dynamic, and changes will be reflected immediately.  Removing a previously blacklisted entry can be achieved via:\n\n    rm /etc/blacklist.d/1.2.3.4\n\n\nPerformance\n-----------\n\nThe module is pretty lightweight, a single extra `stat()` call for each visitor will be made to perform the access-test.\n\nIn a low-traffic server, which is not otherwise I/O bound, this overhead should be minimal.\n\n\nCompilation\n-----------\n\nAssume you have the appropriate Apache-development package(s) installed upon your host it can be compiled `apxs`:\n\n    apxs2 -c mod_blacklist.c\n\nThe `Makefile` does that for you.\n\n\nInstallation\n------------\n\nOnce compiled copy the `.so` file from `.libs` to `/usr/lib/apache2/modules`, or your local module path.\n\nTo cause the module to be loaded by Apache create the file `/etc/apache2/mods-enabled/blacklist.load` with the following contents (adjusting your local path if different):\n\n     LoadModule blacklist_module /usr/lib/apache2/modules/mod_blacklist.so\n\nIf you wish to change the prefix-directory in which blacklisted IP addresses are stored then you can use the `BlacklistPrefix` setting.  This is a global setting, which you could add to the file  `/etc/apache2/mods-enabled/blacklist.conf`:\n\n     # Change the blacklist prefix.\n     BlacklistPrefix /root/blacklist.d/\n\nSteve\n--\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskx%2Fmod_blacklist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskx%2Fmod_blacklist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskx%2Fmod_blacklist/lists"}