Moodle plugins directory: Availability restriction by IP address | Moodle.org
Availability restriction by IP address
Availability restriction ::: availability_ipaddress
Maintained by Luuk Verhoeven, Vincent Cornelis, hamza tamyachte
Moodle availability plugin which lets users restrict resources and activities with IP address
Latest release:
446 sites
88 downloads
21 fans
Current versions available: 1
Moodle - availability IP address plugin
Restrict access to any activity by IP-address. This plugin can be used to make any chosen activity unavailable based on the user's IP.
Author
- Author: Luuk Verhoeven
- Min. required: Moodle 3.5.x
List of features
- Supports comma separate list of ip-addresses
- Subnet support, eg 192.168.1.0/24
- Inline ip-address validation
- Turning on/off with eye icon, without lossing the input value.
Installation
- Copy this plugin to the
availability\condition\ipaddress
folder on the server - Login as administrator
- Go to Site Administrator > Notification
- Install the plugin
Usage
- Add or edit an activity in a Moodle course.
- Go to the section "Restrict access"
- Click IP address in the modal
- There's a new input field that supports a list of comma separated ip address e.g. 127.0.0.1, 192.168.1.0/24
- The users with matching ip addresses can view the activity.
- Save the activity
Security
If you discover any security related issues, please email luuk@MFreak.nl instead of using the issue tracker.
Contributing
Contributions are welcome and will be fully credited. We accept contributions via Pull Requests on Github.
Changelog
- 2022021100 Thanks for adding ip-range support @juacas
- 2022052800 Fixed the issue 6 @hamzatamyachte
- 2022052801 Test in Moodle 4.0 @hamzatamyachte
Useful links
Contributors
Luuk Verhoeven (Lead maintainer)
Vincent Cornelis
hamza tamyachte
Please login to view contributors details and/or to contact them
You can download the plugin, unzip it and place it in the /availability folder.
After that go trough the install process on your site (login as an administrator) and install the plugin. You can then use it in your activities.
is there a documentation for this plugin?
Cheers Kasia
This very basic restriction plugin;
1. Add or edit an activity in a Moodle course.
2. Go to the section "Restrict access"
3. Select IP address in the modal
4. There's a new input field that supports a list of comma separated ip address e.g. 127.0.0.1, 192.168.1.0/24
4.1 The users with matching ip addresses can view the activity.
5. Save the activity
For answering the question of @stefano federici and for clarify .
"192.168.1.0/24":
192.168.1.0 is the ip address part it can be (IPv4 or IPv6).
24 is the number of bits in the net mask.
2^8 = 256 possible ip adresses.
In the case of submitting this value '192.168.1.0/24' in the input. only the users who connected by the ip addresses from
192.168.1.0 to 192.168.1.255 can have the access to the activity.
Example 1 : "134.145.3.1/16":
2^16 = 65536 possible ip adresses.
In this case only the users who had ip addresses from 134.145.0.1 to 134.145.255.255 can view the activity.
Example 2 : "134.145.0.1/29":
2^3 = 6 possible ip adresses.
In this case only the users who had ip addresses from 134.145.0.1 to 134.145.0.6 can view the activity.
Thanks.
I have questionnaires restricted by IP in many courses, my provider has changed my IP and I have to change the IP in all the courses. Is there a way to make this change in bulk?
In which database table is the IP value stored to change it?
Thank you
The answer of your first question. No there is no way for now to change the ip addresses for all activity modules restriction in bulk, maybe in the future.
And about your second question. Yes you can make the changes if you want. you can search by course id in course modules database table in the availability column.
Best regards.