{"id":23867839,"url":"https://github.com/philipn/django-block-ip","last_synced_at":"2025-09-08T16:32:22.934Z","repository":{"id":15726471,"uuid":"18464717","full_name":"philipn/django-block-ip","owner":"philipn","description":"A simple django app to block IP addresses and masks.","archived":false,"fork":false,"pushed_at":"2021-10-15T05:50:26.000Z","size":12,"stargazers_count":38,"open_issues_count":4,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-09T10:16:37.560Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philipn.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}},"created_at":"2014-04-05T10:36:04.000Z","updated_at":"2024-04-17T18:22:50.000Z","dependencies_parsed_at":"2022-08-25T11:50:18.247Z","dependency_job_id":null,"html_url":"https://github.com/philipn/django-block-ip","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philipn%2Fdjango-block-ip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philipn%2Fdjango-block-ip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philipn%2Fdjango-block-ip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philipn%2Fdjango-block-ip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philipn","download_url":"https://codeload.github.com/philipn/django-block-ip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232327034,"owners_count":18505990,"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":"2025-01-03T11:14:55.642Z","updated_at":"2025-01-03T11:14:56.336Z","avatar_url":"https://github.com/philipn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"django-block-ip\n---------------\n\nThis is a simple application to restrict access by IP address.  There's a few other apps that do this out there, but they tend to have other features such as rate limiting.  I think it's best to leave rate-limiting to rate-limiting specific apps.\n\nUsage\n=====\n\n1. `pip install django-block-ip`\n1. Add `block_ip` to your `INSTALLED_APPS`.\n1. Add `block_ip.middleware.BlockIPMiddleware` to your `MIDDLEWARE_CLASSES`.\n1. Run `syncdb`.\n1. Add one or more entries to the `BlockIP` list in the admin.\n  You can just enter a single IP or use a network mask, like this: 213.67.43.0/24\n\nAcknowledgments\n===============\n\nThis is based on http://github.com/svetlyak40wt/django-ban, which was based on the Justquick's django snippet (http://www.djangosnippets.org/snippets/725/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilipn%2Fdjango-block-ip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilipn%2Fdjango-block-ip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilipn%2Fdjango-block-ip/lists"}