Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/philipn/django-block-ip
A simple django app to block IP addresses and masks.
https://github.com/philipn/django-block-ip
Last synced: 10 days ago
JSON representation
A simple django app to block IP addresses and masks.
- Host: GitHub
- URL: https://github.com/philipn/django-block-ip
- Owner: philipn
- License: other
- Created: 2014-04-05T10:36:04.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2021-10-15T05:50:26.000Z (about 3 years ago)
- Last Synced: 2024-08-09T10:16:37.560Z (5 months ago)
- Language: Python
- Size: 11.7 KB
- Stars: 38
- Watchers: 5
- Forks: 24
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
django-block-ip
---------------This 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.
Usage
=====1. `pip install django-block-ip`
1. Add `block_ip` to your `INSTALLED_APPS`.
1. Add `block_ip.middleware.BlockIPMiddleware` to your `MIDDLEWARE_CLASSES`.
1. Run `syncdb`.
1. Add one or more entries to the `BlockIP` list in the admin.
You can just enter a single IP or use a network mask, like this: 213.67.43.0/24Acknowledgments
===============This is based on http://github.com/svetlyak40wt/django-ban, which was based on the Justquick's django snippet (http://www.djangosnippets.org/snippets/725/).