PHPackages                             alxsad/stack-ip-firewall - 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. alxsad/stack-ip-firewall

ActiveLibrary

alxsad/stack-ip-firewall
========================

Stack middleware for filtering IP

v1.0(11y ago)08MITPHPPHP &gt;=5.4

Since Jan 19Pushed 9y ago1 watchersCompare

[ Source](https://github.com/alxsad/stack-ip-firewall)[ Packagist](https://packagist.org/packages/alxsad/stack-ip-firewall)[ RSS](/packages/alxsad-stack-ip-firewall/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

[![Build
Status](https://camo.githubusercontent.com/5d5b2af03a91f3e977f652b6d6bb21491113493a61780349f9017b0e18ed8f0d/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f616c787361642f737461636b2d69702d6669726577616c6c2e706e67)](http://travis-ci.org/alxsad/stack-ip-firewall)[![Latest Stable Version](https://camo.githubusercontent.com/380c7a379fd60acbd93671e144fa6ec69c6b18c195ccaced1ae08b49e26a5ae6/68747470733a2f2f706f7365722e707567782e6f72672f616c787361642f737461636b2d69702d6669726577616c6c2f762f737461626c652e706e67)](https://packagist.org/packages/alxsad/stack-ip-firewall)

IpFirewall middleware
=====================

[](#ipfirewall-middleware)

[Stack](http://stackphp.com) middleware to filtering IP.

Intallation
-----------

[](#intallation)

The recommended way to install this library is through [Composer](http://getcomposer.org/):

```
{
    "require": {
        "alxsad/stack-ip-firewall": "~1.0"
    }
}
```

Usage
-----

[](#usage)

```
use Symfony\Component\HttpFoundation\Request;

$loader = require_once __DIR__ . '/../app/bootstrap.php.cache';
require_once __DIR__ . '/../app/AppKernel.php';

$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();

$stack = (new Stack\Builder())->push('Alxsad\Stack\IpFirewall', [
  '192.168.1.*',
  '192.168.10.10',
]);

$kernel = $stack->resolve($kernel);

Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();

$response = $kernel->handle($request);
$response->send();

$kernel->terminate($request, $response);
```

License
-------

[](#license)

This library is released under the MIT License. See the bundled LICENSE file for details.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

4128d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/484c8b83e978da81a83ea6feb2ebefa319d45edbdd962299e5d5c50628edd7d5?d=identicon)[alxsad](/maintainers/alxsad)

---

Top Contributors

[![alxsad](https://avatars.githubusercontent.com/u/474347?v=4)](https://github.com/alxsad "alxsad (5 commits)")

---

Tags

stackstack middlewareip firewall

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alxsad-stack-ip-firewall/health.svg)

```
[![Health](https://phpackages.com/badges/alxsad-stack-ip-firewall/health.svg)](https://phpackages.com/packages/alxsad-stack-ip-firewall)
```

###  Alternatives

[asm89/stack-cors

Cross-origin resource sharing library and stack middleware

1.3k180.6M24](/packages/asm89-stack-cors)[alsar/stack-ip-restrict

Stack middleware for allowing application access for specific IP addresses

314.9k](/packages/alsar-stack-ip-restrict)[stack/callable-http-kernel

HttpKernelInterface implementation based on callables.

2439.6k14](/packages/stack-callable-http-kernel)[linio/tortilla

A highly opinionated microframework built with speed and simplicity in mind.

133.0k2](/packages/linio-tortilla)

PHPackages © 2026

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