PHPackages                             vendic/magento2-adminrestriction - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. vendic/magento2-adminrestriction

ActiveMagento2-module[Security](/categories/security)

vendic/magento2-adminrestriction
================================

Magento2 Admin IP based restriction - Member of MageSpecialist SecuritySuite

2.1.1(1y ago)22.2k↓35%OSL 3.0PHPPHP ^8.2.0|^8.3.0

Since Jul 15Pushed 1y agoCompare

[ Source](https://github.com/Vendic/magento2-adminrestriction)[ Packagist](https://packagist.org/packages/vendic/magento2-adminrestriction)[ RSS](/packages/vendic-magento2-adminrestriction/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (16)Used By (0)

Magento 2 Admin Restriction
===========================

[](#magento-2-admin-restriction)

Protect your Magento backend by restricting access based on IP addresses.

This module provides comprehensive admin security by working with Magento's Two-Factor Authentication (2FA) system:

- **Without 2FA enabled**: Access is only allowed from whitelisted IPs
- **With 2FA enabled**:
    - Users on whitelisted IPs can login without using 2FA
    - Users from non-whitelisted IPs are prompted for 2FA verification

*Originally forked from [magespecialist/m2-MSP\_AdminRestriction](https://github.com/magespecialist/m2-MSP_AdminRestriction)*

Why this fork?
--------------

[](#why-this-fork)

This fork is maintained by Vendic to:

1. Add compatibility with Magento's Two-Factor Authentication
2. Provide ongoing maintenance and updates
3. Ensure the module continues to work with recent Magento 2 versions

Installation
------------

[](#installation)

**1. Install using composer**

```
composer require vendic/magento2-adminrestriction
```

**2. Enable and configure from your Magento backend config**

[![](https://raw.githubusercontent.com/magespecialist/m2-MSP_AdminRestriction/master/screenshots/config.png)](https://raw.githubusercontent.com/magespecialist/m2-MSP_AdminRestriction/master/screenshots/config.png)

Configuration
-------------

[](#configuration)

The module allows you to:

- Enable/disable IP restrictions
- Define a comma-separated list of allowed IPs or CIDR notations (e.g., `127.0.0.1,192.168.0.0/24`)

Two-Factor Authentication Integration
-------------------------------------

[](#two-factor-authentication-integration)

This module intelligently integrates with Magento's 2FA capabilities:

IP Status2FA StatusBehaviorOn whitelist2FA disabledAccess grantedOn whitelist2FA enabledAccess granted without 2FA promptNot on whitelist2FA disabledAccess deniedNot on whitelist2FA enabled2FA verification requiredEmergency Command Line Access
-----------------------------

[](#emergency-command-line-access)

If you've accidentally locked yourself out of the admin panel, you can use these commands:

**Disable IP restrictions completely:**

```
php bin/magento msp:security:admin_restriction:ip disable
```

**Add new IP addresses to the whitelist:**

```
php bin/magento msp:security:admin_restriction:ip 127.0.0.1,192.168.0.0/24
```

Maintenance
-----------

[](#maintenance)

This module is actively maintained by [Vendic](https://www.vendic.nl/). Issues and pull requests are welcome on our GitHub repository.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance47

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~266 days

Recently: every ~693 days

Total

13

Last Release

396d ago

Major Versions

0.1.3 → 1.0.02017-05-31

1.3.0 → 2.0.02025-04-01

PHP version history (4 changes)0.1.0PHP ~5.5.0|~5.6.0|~7.0.0

1.0.0PHP ~7.0.0

1.2.1PHP ^7.0|^7.1

2.0.0PHP ^8.2.0|^8.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/459ec352617fd5a9f46070338b99ed03828fc902eb0a361aed717576e67bd2c4?d=identicon)[TjitseE](/maintainers/TjitseE)

---

Top Contributors

[![Tjitse-E](https://avatars.githubusercontent.com/u/14849044?v=4)](https://github.com/Tjitse-E "Tjitse-E (14 commits)")[![phoenix128](https://avatars.githubusercontent.com/u/10189093?v=4)](https://github.com/phoenix128 "phoenix128 (11 commits)")[![MaximGordin1](https://avatars.githubusercontent.com/u/206547507?v=4)](https://github.com/MaximGordin1 "MaximGordin1 (4 commits)")[![peterjaap](https://avatars.githubusercontent.com/u/431360?v=4)](https://github.com/peterjaap "peterjaap (1 commits)")[![slackerzz](https://avatars.githubusercontent.com/u/3061752?v=4)](https://github.com/slackerzz "slackerzz (1 commits)")

### Embed Badge

![Health badge](/badges/vendic-magento2-adminrestriction/health.svg)

```
[![Health](https://phpackages.com/badges/vendic-magento2-adminrestriction/health.svg)](https://phpackages.com/packages/vendic-magento2-adminrestriction)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[illuminate/encryption

The Illuminate Encryption package.

9229.7M280](/packages/illuminate-encryption)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
