PHPackages                             luisinder/ip-control-middleware - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. luisinder/ip-control-middleware

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

luisinder/ip-control-middleware
===============================

Middleware to control access by IP

1.2(9y ago)035BSD-3-ClausePHP

Since Oct 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/luisinder/ip-control-middleware)[ Packagist](https://packagist.org/packages/luisinder/ip-control-middleware)[ Docs](https://github.com/luisinder/remote-port-middleware)[ RSS](/packages/luisinder-ip-control-middleware/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

IP Control Middleware
=====================

[](#ip-control-middleware)

[![Latest Stable Version](https://camo.githubusercontent.com/058cf72abc2622902e09c42133feca59a5e7f29f76f75048e3abeb2e9f5a91eb/68747470733a2f2f706f7365722e707567782e6f72672f6c756973696e6465722f69702d636f6e74726f6c2d6d6964646c65776172652f762f737461626c65)](https://packagist.org/packages/luisinder/ip-control-middleware)[![Total Downloads](https://camo.githubusercontent.com/e7350ca59f73df1ceab8e0ae908ab5d271f854980ac186c02c6b6dba82ea342f/68747470733a2f2f706f7365722e707567782e6f72672f6c756973696e6465722f69702d636f6e74726f6c2d6d6964646c65776172652f646f776e6c6f616473)](https://packagist.org/packages/luisinder/ip-control-middleware)

Middleware to control the IPs that have access to the application.

- Allows adding multiple IPs.
- Defines a return URL in case the IP is not allowed.

### Installation

[](#installation)

Using Composer:

```
$ composer require luisinder/ip-control-middleware
```

### Use

[](#use)

Allowed IPs must be inside an array. The second parameter is the return URL in case of failure:

```
$app->add(new Luisinder\Middleware\IpControl(['::1','192.168.1.0','127.0.0.1'],"https://github.com"));
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~0 days

Total

4

Last Release

3487d ago

Major Versions

0.1.1 → 1.0.02016-10-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/41f285cd1fc2a408b0a71a01adb00bf6bfd9925edf8e4dbe16acc73361c108fc?d=identicon)[luisinder](/maintainers/luisinder)

---

Top Contributors

[![lcajigasm](https://avatars.githubusercontent.com/u/6973356?v=4)](https://github.com/lcajigasm "lcajigasm (9 commits)")

---

Tags

middlewareIPcontrol

### Embed Badge

![Health badge](/badges/luisinder-ip-control-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/luisinder-ip-control-middleware/health.svg)](https://phpackages.com/packages/luisinder-ip-control-middleware)
```

###  Alternatives

[akrabat/ip-address-middleware

PSR-15 middleware that determines the client IP address and stores it as a ServerRequest attribute

1702.5M18](/packages/akrabat-ip-address-middleware)[lab404/laravel-auth-checker

Laravel Auth Checker allows you to log users authentication, devices authenticated from and lock intrusions.

223164.9k2](/packages/lab404-laravel-auth-checker)[chadicus/slim-oauth2-middleware

OAuth2 middleware for use within a Slim Framework API

48411.9k1](/packages/chadicus-slim-oauth2-middleware)[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

129228.6k10](/packages/dereuromark-cakephp-tinyauth)[dyorg/slim-token-authentication

Slim 3.0+ Token Authentication Middleware

78106.5k](/packages/dyorg-slim-token-authentication)[akrabat/proxy-detection-middleware

PSR-7/PSR-15 Middleware that determines the scheme, host and port from the 'X-Forwarded-Proto', 'X-Forwarded-Host' and 'X-Forwarded-Port' headers and updates the Request's Uri object.

3190.4k1](/packages/akrabat-proxy-detection-middleware)

PHPackages © 2026

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