PHPackages                             solution-forest/filament-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. solution-forest/filament-firewall

ActiveLibrary[Security](/categories/security)

solution-forest/filament-firewall
=================================

This is a middleware for whitelisting/blacklisting for Filament Admin

4.0.0(5mo ago)4410.4k↓25.6%13[1 issues](https://github.com/solutionforest/filament-firewall/issues)[1 PRs](https://github.com/solutionforest/filament-firewall/pulls)2MITPHPPHP ^8.0CI passing

Since May 18Pushed 2w ago1 watchersCompare

[ Source](https://github.com/solutionforest/filament-firewall)[ Packagist](https://packagist.org/packages/solution-forest/filament-firewall)[ Docs](https://github.com/solution-forest/filament-firewall)[ RSS](/packages/solution-forest-filament-firewall/feed)WikiDiscussions 4.x Synced 2d ago

READMEChangelog (10)Dependencies (16)Versions (16)Used By (2)

Important

Please note that we will only be updating to version 4.x, excluding any bug fixes.

About Solution Forest
---------------------

[](#about-solution-forest)

[Solution Forest](https://solutionforest.com) Web development agency based in Hong Kong. We help customers to solve their problems. We Love Open Sources.

We have built a collection of best-in-class products:

- [InspireCMS](https://inspirecms.net): A full-featured Laravel CMS with everything you need out of the box. Build smarter, ship faster with our complete content management solution.
- [Filaletter](https://filaletter.solutionforest.net): Filaletter - Filament Newsletter Plugin
- [Website CMS Management](https://filamentphp.com/plugins/solution-forest-cms-website): A hands-on Filament CMS plugin for those who prefer more manual control over their website content management.

Filament Firewall
=================

[](#filament-firewall)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f3e46f4f9340625be4b2ccf6e0141483ee3e230921bbbfc3793976bde269d308/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f6c7574696f6e2d666f726573742f66696c616d656e742d6669726577616c6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/solution-forest/filament-firewall)[![Total Downloads](https://camo.githubusercontent.com/1e03b01c15b1088419c4a09f3a1a6fc7ab02e17f75421fced85e9992fba6274c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f6c7574696f6e2d666f726573742f66696c616d656e742d6669726577616c6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/solution-forest/filament-firewall)

This package provides a whitelist and blacklist feature to restrict access to your Laravel application and Filament admin panel. For additional functionality, please refer to the [Laravel Firewall package](https://github.com/akaunting/laravel-firewall).

[![filament-firewall-package-1](https://private-user-images.githubusercontent.com/68525320/238897675-153b1478-003f-4ef9-bebc-8ed249647e9f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5ODYzODksIm5iZiI6MTc4Mjk4NjA4OSwicGF0aCI6Ii82ODUyNTMyMC8yMzg4OTc2NzUtMTUzYjE0NzgtMDAzZi00ZWY5LWJlYmMtOGVkMjQ5NjQ3ZTlmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAyVDA5NTQ0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRlOThmNzAyNTcxNjdlNzZhM2QwMzgwYWMxN2E3N2JlYmNkOGVkMjg5YWYxYzQ4ZjI2OGE2ZDc1NTIzNWExMzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.jF8bssgljP8sriRooYPJU58XQJNacIOgmHvQT1K79tc)](https://private-user-images.githubusercontent.com/68525320/238897675-153b1478-003f-4ef9-bebc-8ed249647e9f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5ODYzODksIm5iZiI6MTc4Mjk4NjA4OSwicGF0aCI6Ii82ODUyNTMyMC8yMzg4OTc2NzUtMTUzYjE0NzgtMDAzZi00ZWY5LWJlYmMtOGVkMjQ5NjQ3ZTlmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAyVDA5NTQ0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRlOThmNzAyNTcxNjdlNzZhM2QwMzgwYWMxN2E3N2JlYmNkOGVkMjg5YWYxYzQ4ZjI2OGE2ZDc1NTIzNWExMzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.jF8bssgljP8sriRooYPJU58XQJNacIOgmHvQT1K79tc)[![filament-firewall-package-2](https://private-user-images.githubusercontent.com/68525320/238897690-1cde3993-77e1-4e64-8e4c-9727f1a40801.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5ODYzODksIm5iZiI6MTc4Mjk4NjA4OSwicGF0aCI6Ii82ODUyNTMyMC8yMzg4OTc2OTAtM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PWM5Y2ZjNWNhMjhjOTE1N2U5MTg3NTQ1NmI0ZGVhNDQwNDQwNjAzMTA3ODQ2YjJkMWZlMGM4ZGU4MjA1MmI3OGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9._aIKNqDbDLuywCokau7JEmBcrLN10-1GYAikO6XqLGQ)

Supported Filament versions
---------------------------

[](#supported-filament-versions)

Filament VersionPlugin Versionv21.x.xv32.x.xv43.x.xv54.x.xGetting Started
---------------

[](#getting-started)

1. Install the package using the `composer require` command:

    ```
    composer require solution-forest/filament-firewall
    ```
2. To publish the configuration files and migrations files for this plugin, as well as automatically run migration, enter the following command:

    ```
    php artisan filament-firewall:install
    ```
3. This package comes with `WhitelistRangeMiddleware`. You need to register it in `$middleware`:

    **For Laravel version 11.x and above:**

    ```
    // in bootstrap/app.php
    ->withMiddleware(function (Middleware $middleware) {
         $middleware->append(\SolutionForest\FilamentFirewall\Middleware\WhitelistRangeMiddleware::class);
    })
    ```

    **For Laravel versions below 11.x:**

    ```
    // in app/Http/Kernel.php
    protected $middleware = [
         ...
         \SolutionForest\FilamentFirewall\Middleware\WhitelistRangeMiddleware::class,
    ];
    ```
4. You can change the setting in the `config/filament-firewall.php` file to skip the middleware `WhitelistRangeMiddleware` check.
5. For additional configuration options, you can refer to the [Laravel Firewall configuration file](https://github.com/akaunting/laravel-firewall/blob/master/src/Config/firewall.php) to customize more firewall settings. Some key configuration options include:

    - `config('firewall.enabled')` - Controls whether the firewall is enabled (default: `true`)
    - `config('firewall.middleware')` - Middleware configuration settings
6. Register the plugin in your Panel provider:

    > **Important: Register the plugin in your Panel provider after version 2.x**

    ```
     use SolutionForest\FilamentFirewall\FilamentFirewallPlugin;

     public function panel(Panel $panel): Panel
     {
         return $panel
             ->plugin(FilamentFirewallPlugin::make());
     }
    ```

Usage
-----

[](#usage)

- On the IP Firewall page, you have the ability to add IPs to either a whitelist or a blocklist. The `WhitelistRangeMiddleware` middleware will automatically handle whitelist IP access. If you need to block a range of IPs while allowing a specific IP, such as blocking *172.19.0.0/24* except for *172.19.0.1*, you'll need to create a new **Deny** access record and specify the IP and prefix as *'172.19.0.0'* and *'24'*. Additionally, you'll need to add an **Allow** access record for the specific IP *'172.19.0.1'*.

[![filament-firewall-package-2](https://private-user-images.githubusercontent.com/68525320/238897690-1cde3993-77e1-4e64-8e4c-9727f1a40801.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5ODYzODksIm5iZiI6MTc4Mjk4NjA4OSwicGF0aCI6Ii82ODUyNTMyMC8yMzg4OTc2OTAtMWNkZTM5OTMtNzdlMS00ZTY0LThlNGMtOTcyN2YxYTQwODAxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAyVDA5NTQ0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM5Y2ZjNWNhMjhjOTE1N2U5MTg3NTQ1NmI0ZGVhNDQwNDQwNjAzMTA3ODQ2YjJkMWZlMGM4ZGU4MjA1MmI3OGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9._aIKNqDbDLuywCokau7JEmBcrLN10-1GYAikO6XqLGQ)](https://private-user-images.githubusercontent.com/68525320/238897690-1cde3993-77e1-4e64-8e4c-9727f1a40801.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5ODYzODksIm5iZiI6MTc4Mjk4NjA4OSwicGF0aCI6Ii82ODUyNTMyMC8yMzg4OTc2OTAtMWNkZTM5OTMtNzdlMS00ZTY0LThlNGMtOTcyN2YxYTQwODAxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzAyVDA5NTQ0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM5Y2ZjNWNhMjhjOTE1N2U5MTg3NTQ1NmI0ZGVhNDQwNDQwNjAzMTA3ODQ2YjJkMWZlMGM4ZGU4MjA1MmI3OGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9._aIKNqDbDLuywCokau7JEmBcrLN10-1GYAikO6XqLGQ)

- Get whitelist / blacklist records

    ```
    // whitelist
    \SolutionForest\FilamentFirewall\Facade\FilamentFirewall::getWhiteList();

    // blacklist
    \SolutionForest\FilamentFirewall\Facade\FilamentFirewall::getBlackList();
    ```
- Determine whether an IP address is included in a whitelist or blacklist

    ```
    // whitelist
    \SolutionForest\FilamentFirewall\Facade\FilamentFirewall::withinWhiteList($ip);

    // blacklist
    \SolutionForest\FilamentFirewall\Facade\FilamentFirewall::withinBlackList($ip);
    ```

Publishing translations
-----------------------

[](#publishing-translations)

```
php artisan vendor:publish --tag=filament-firewall-translations
```

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

Please see [License File](LICENSE.md) for more information.

Credits
-------

[](#credits)

- [Laravel Firewall](https://github.com/akaunting/laravel-firewall)

###  Health Score

54

—

FairBetter than 96% of packages

Maintenance86

Actively maintained with recent releases

Popularity39

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.3% 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 ~77 days

Recently: every ~22 days

Total

15

Last Release

65d ago

Major Versions

1.x-dev → 2.0.02023-08-08

2.0.4 → 3.0.02025-08-01

3.0.2 → 4.0.02026-02-02

2.x-dev → 3.x-dev2026-02-02

3.x-dev → 4.x-dev2026-04-29

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/68211796?v=4)[Solution Forest](/maintainers/solutionforest)[@solutionforest](https://github.com/solutionforest)

---

Top Contributors

[![cklei-carly](https://avatars.githubusercontent.com/u/68525320?v=4)](https://github.com/cklei-carly "cklei-carly (55 commits)")[![lam0819](https://avatars.githubusercontent.com/u/68211972?v=4)](https://github.com/lam0819 "lam0819 (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![gergo85](https://avatars.githubusercontent.com/u/2959112?v=4)](https://github.com/gergo85 "gergo85 (3 commits)")[![a21ns1g4ts](https://avatars.githubusercontent.com/u/11599205?v=4)](https://github.com/a21ns1g4ts "a21ns1g4ts (3 commits)")[![solutionforestteam](https://avatars.githubusercontent.com/u/53035878?v=4)](https://github.com/solutionforestteam "solutionforestteam (2 commits)")[![matthewmnewman](https://avatars.githubusercontent.com/u/10243428?v=4)](https://github.com/matthewmnewman "matthewmnewman (1 commits)")

---

Tags

filament-pluginfilamentadminfilamentphpfirewallfirewall-configurationfirewall-managementlaravelSolution Forestfilament-firewall

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/solution-forest-filament-firewall/health.svg)

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

###  Alternatives

[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17760.2k3](/packages/stephenjude-filament-jetstream)[stephenjude/filament-debugger

About

104162.2k2](/packages/stephenjude-filament-debugger)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

84215.9k9](/packages/stephenjude-filament-two-factor-authentication)[solution-forest/filament-email-2fa

filament-email-2fa

3211.0k](/packages/solution-forest-filament-email-2fa)

PHPackages © 2026

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