Restriction by IP address

Availability conditions ::: availability_ipaddress
Maintained by MFreakLuuk Verhoeven
Moodle availability plugin which lets users restrict resources and activities with ip address access

Restriction by IP address 3.10.0

Moodle 3.5, 3.6, 3.7, 3.8, 3.9, 3.10
Released: Wednesday, November 18, 2020, 4:53 PM

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: Luuk Verhoeven,
  • Min. required: Moodle 3.5.x
  • Supports PHP: 7.2

Build Status Moodle35Moodle36Moodle37Moodle38Moodle39Moodle310PHP7.2


List of features

  • Supports comma separate list of ip-addresses
  • Subnet support, eg
  • Inline ip-address validation
  • Turning on/off with eye icon, without lossing the input value.


  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


  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.,
    1. The users with matching ip addresses can view the activity.
  5. Save the activity


  • Behat tests ip validation


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


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


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

Version information

Version build number
Version release name
Stable version
MD5 Sum
Supported software
PHP 7.2, Moodle 3.5, Moodle 3.6, Moodle 3.7, PHP 7.3, PHP 7.4, Moodle 3.8, Moodle 3.9, Moodle 3.10
  • Latest release for Moodle 3.5
  • Latest release for Moodle 3.6
  • Latest release for Moodle 3.7
  • Latest release for Moodle 3.8
  • Latest release for Moodle 3.9
  • Latest release for Moodle 3.10

Version control information

Version control system (VCS)
VCS repository URL
VCS tag