IP Authentication for Django
IP based authentication for Django. IP ranges are specified and tied to a user account.
Install the django_ipauth package into your path either using buildout, easy_install or pip.
Make the following changes to your settings.py * Add ‘ipauth.backend.RangeBackend’ to your AUTHENTICATION_BACKENDS * Add ipauth to your INSTALLED_APPS * If it isn’t already, add django.contrib.auth to your INSTALLED_APPS
Change your login url to use the ipauth.views.login view.
Run manage.py syncdb
If you are using the contrib.admin package from Django, you should have a new section in your admin site called Ipauth where you can add Ranges.
Added logging to backend and login view
Fixed validation bugs in Range
Made range collision validation errors more verbose
Fixed a validation bug for IPAddressFormField
Made the upper end of the range optional
Fixed a bug in the Range model clean method if upper is null
IPAddressFormField for inputting IP Addresses
IPAddressModelField for storing IP addresses as integers (so math works)
Range Model for storing IP Ranges tied to a user account
Range Authentication backend
A login view wrapper that attempts to login via IP first
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.