PHPackages                             pratik-dabhi/laravel-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. pratik-dabhi/laravel-firewall

ActiveLibrary[Security](/categories/security)

pratik-dabhi/laravel-firewall
=============================

A powerful and extensible firewall package for Laravel 10+ supporting IP blocking, CIDR rules, rate limiting, request logging, and country blocking.

v2.0.0(1mo ago)11↑2900%MITPHPPHP ^8.2

Since Dec 5Pushed 1mo agoCompare

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

READMEChangelog (4)Dependencies (9)Versions (7)Used By (0)

Laravel Firewall
================

[](#laravel-firewall)

A powerful, extensible, and developer-friendly **application-level firewall for Laravel 10+**.

This package gives your Laravel app real-time protection through:

- 🔒 **IP Blacklisting / Whitelisting**
- 🌐 **CIDR Blocking**
- 🚫 **Rate Limiting Rule Engine**
- 📄 **Database Logging of Security Events**
- 📊 **Beautiful Firewall Dashboard UI**
- 📜 **Detailed Logs Viewer Page**
- 🧱 **Plug-and-play Middleware**
- ✔ Fully tested using **Laravel Testbench**

It brings enterprise-level request filtering &amp; monitoring into your Laravel application with minimal configuration.

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

[](#installation)

```
composer require pratik-dabhi/laravel-firewall
```

Publishing
----------

[](#publishing)

### Migrations

[](#migrations)

```
php artisan vendor:publish --tag="firewall-migrations"
php artisan migrate
```

### Config

[](#config)

```
php artisan vendor:publish --tag="firewall-config"
```

### Views

[](#views)

```
php artisan vendor:publish --tag="firewall-views"
```

Usage
-----

[](#usage)

Register middleware in Laravel 12 (`bootstrap/app.php`):

```
->withMiddleware(function (Middleware $middleware) {
    $middleware->alias([
        'firewall' => \PratikDabhi\Firewall\Middleware\Firewall::class,
    ]);
})
```

Protect routes:

```
Route::middleware(['firewall'])->group(function () {
    Route::get('/', fn() => 'Protected Page');
});
```

Dashboard routes:

```
Route::get('/firewall/dashboard', fn() => view('vendor.firewall.dashboard'));
Route::get('/firewall/logs', fn() => view('vendor.firewall.logs'));
```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- Pratik Dabhi
- All Contributors

License
-------

[](#license)

MIT License.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance90

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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

Every ~37 days

Total

4

Last Release

46d ago

Major Versions

v1.2.0 → v2.0.02026-03-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/8658cce573eae622e5202e7d7d975d25063838a6b32f247ae6118d1fb394d76a?d=identicon)[pratik-dabhi](/maintainers/pratik-dabhi)

---

Top Contributors

[![pratik-dabhi](https://avatars.githubusercontent.com/u/127773367?v=4)](https://github.com/pratik-dabhi "pratik-dabhi (12 commits)")

---

Tags

middlewarelaravelgeoipsecuritylaravel-packagelogsrate limitblacklistfirewallcidrip-blockingwhitelistcountry-blockingddos-protection

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pratik-dabhi-laravel-firewall/health.svg)

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

###  Alternatives

[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)

PHPackages © 2026

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