Availability restriction by IP address

Availability restriction ::: availability_ipaddress
Maintained by Luuk VerhoevenLuuk Verhoeven, Vincent Cornelis, hamza tamyachte
Moodle availability plugin which lets users restrict resources and activities with IP address

Availability restriction by IP address 5.0.0

Moodle 4.0, 4.1, 4.2, 4.3, 4.4, 4.5, 5.0
Released: Tuesday, May 27, 2025, 8:44 PM

Moodle - availability ip address plugin

Enhance activity security by restricting access based on IP address. This plugin allows you to control the availability of any chosen activity, making it accessible only to users from specified IP addresses.

Author

MFreak.nl

  • Author: Luuk Verhoeven, ldesignmedia.nl
  • Min. required: Moodle 4.0
  • Supports PHP: 7.4

Moodle400 Moodle401 Moodle402 Moodle403 Moodle404 Moodle405 Moodle500

PHP7.4 PHP8.0 PHP8.1 PHP8.2

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

  1. Copy this plugin to the availability\condition\ipaddress folder on the server
  2. Login as administrator
  3. Go to Site Administrator > Notification
  4. Install the plugin

Usage

  1. Add or edit an activity in a Moodle course.
  2. Go to the section "Restrict access"
  3. Click 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
    1. The users with matching ip addresses can view the activity.
  5. Save the activity

TODO

  • Behat tests ip validation

Security

If you discover any security related issues, please email luuk@ldesignmedia.nl instead of using the issue tracker.

License

The GNU GENERAL PUBLIC LICENSE. Please see License File for more information.

Contributing

Contributions are welcome and will be fully credited. We accept contributions via Pull Requests on Github.

Changelog

  • 2025040400 Tested on Moodle 4.5
  • 2024072000 Tested on Moodle 4.4
  • 2022021100 Thanks for adding ip-range support @juacas
  • 2022052800 Fixed the issue 6 @hamzatamyachte
  • 2022052801 Test in Moodle 4.0 @hamzatamyachte

Version information

Version build number
2025052100
Version release name
5.0.0
Maturity
Stable version
MD5 Sum
2c763c58ed3fe8d82ff21b305dd02d86
Supported software
Moodle 4.0, Moodle 4.1, Moodle 4.2, Moodle 4.3, Moodle 4.4, Moodle 4.5, Moodle 5.0
  • Latest release for Moodle 4.0
  • Latest release for Moodle 4.1
  • Latest release for Moodle 4.2
  • Latest release for Moodle 4.3
  • Latest release for Moodle 4.4
  • Latest release for Moodle 4.5
  • Latest release for Moodle 5.0

Version control information

Version control system (VCS)
GIT
VCS repository URL
VCS tag
5.0.0