PHPackages                             jpkleemans/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. [Security](/categories/security)
4. /
5. jpkleemans/firewall

ActiveLibrary[Security](/categories/security)

jpkleemans/firewall
===================

Easy access control for PHP

282PHP

Since Sep 28Pushed 10y ago4 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Firewall
========

[](#firewall)

[![License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)

Easy access control for PHP

> This library is currently under development. Things will change. Things will break.

Install
-------

[](#install)

Via Composer

```
$ composer require jpkleemans/firewall:dev-master
```

Usage
-----

[](#usage)

```
use Firewall\Adapter\HtaccessAdapter;
use Firewall\Host\IP;

// Create an instance of an adapter that implements the Firewall interface.
$firewall = new HtaccessAdapter('path/to/.htaccess');

// Create an instance of a class that implements the Host interface.
$host = IP::fromString('123.0.0.1');

// Block the host
$firewall->deny($host);
```

Planned Adapters
----------------

[](#planned-adapters)

- Htaccess
- NGINX
- IIS
- HHVM
- lighttpd
- PSR-7 Middleware

Testing
-------

[](#testing)

```
$ phpspec run
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b4ef8e7738c77130e1cc63ff7f0503e25c5757145c9ac17cfabc380cba37143?d=identicon)[jpkleemans](/maintainers/jpkleemans)

---

Top Contributors

[![jpkleemans](https://avatars.githubusercontent.com/u/5700014?v=4)](https://github.com/jpkleemans "jpkleemans (11 commits)")

### Embed Badge

![Health badge](/badges/jpkleemans-firewall/health.svg)

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

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[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

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

Realistic password strength estimation PHP library based on Zxcvbn JS

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

The Illuminate Encryption package.

9229.7M280](/packages/illuminate-encryption)[paragonie/hidden-string

Encapsulate strings in an object to hide them from stack traces

7410.6M39](/packages/paragonie-hidden-string)

PHPackages © 2026

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