PHPackages                             maxodrom/yii2-redis-ipban - 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. [Caching](/categories/caching)
4. /
5. maxodrom/yii2-redis-ipban

ActiveYii2-extension[Caching](/categories/caching)

maxodrom/yii2-redis-ipban
=========================

Yii 2 Redis IP ban filter action.

1.4.2(9y ago)247MITPHP

Since Mar 5Pushed 9y ago1 watchersCompare

[ Source](https://github.com/maxodrom/yii2-redis-ipban)[ Packagist](https://packagist.org/packages/maxodrom/yii2-redis-ipban)[ RSS](/packages/maxodrom-yii2-redis-ipban/feed)WikiDiscussions master Synced 2mo ago

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

yii2-redis-ipban
================

[](#yii2-redis-ipban)

[![Yii2 Redis IP ban](./ban-list.png?raw=true)](./ban-list.png?raw=true)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist maxodrom/yii2-redis-ipban

```

or add

```
"maxodrom/yii2-redis-ipban": "~1.0"
```

to the require section of your composer.json.

Configuration &amp; Usage
-------------------------

[](#configuration--usage)

To use this extension, you have to configure the Connection class in your application configuration:

```
return [
    //....
    'components' => [
        'redis' => [
            'class' => 'yii\redis\Connection',
            'hostname' => 'localhost',
            'port' => 6379,
            'database' => 0,
        ],
    ]
];
```

Also add the following to your application modules config:

```
'modules' => [
    'redis-ip-ban' => [
        'class' => 'maxodrom\redis\ipban\Module',
        'redis' => 'redis',
        'allowedIPs' => [], // dont't check IPs, otherwise you can use for example this array ['127.0.0.1', '::1']
        'allowedRoles' => ['SuperAdmin'], // but check RBAC roles!
    ],
    ...
]
```

In your Controller you should use:

```
/**
 * @inheritdoc
 */
public function behaviors()
{
    return [
        ...,
        'ipban' => [
            'class' => \maxodrom\redis\ipban\filters\RedisIpBan::className(),
            'redis' => Yii::$app->redis,
        ],
    ];
}
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity70

Established project with proven stability

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

Recently: every ~15 days

Total

13

Last Release

3291d ago

Major Versions

0.1 → 1.02017-03-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c79da7402e9376230130c590d274bfe4ffbe27e65c3584df4318bab3504371b?d=identicon)[mercium](/maintainers/mercium)

---

Tags

banipbanredisyii2redisfilterIPyii2ban

### Embed Badge

![Health badge](/badges/maxodrom-yii2-redis-ipban/health.svg)

```
[![Health](https://phpackages.com/badges/maxodrom-yii2-redis-ipban/health.svg)](https://phpackages.com/packages/maxodrom-yii2-redis-ipban)
```

###  Alternatives

[pyurin/yii2-redis-ha

Basic redis-ha client

18272.7k](/packages/pyurin-yii2-redis-ha)

PHPackages © 2026

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