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(3mo ago)457.8k↓11.7%13[1 issues](https://github.com/solutionforest/filament-firewall/issues)2MITPHPPHP ^8.0CI passing

Since May 18Pushed 3mo 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 1mo ago

READMEChangelog (10)Dependencies (16)Versions (15)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 Soruces.

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

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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUzNDU3MzYsIm5iZiI6MTc3NTM0NTQzNiwicGF0aCI6Ii82ODUyNTMyMC8yMzg4OTc2OTAtMWNkZTM5OTMtNzdlMS00ZTY0LThlNGMtOTcyN2YxYTQwODAxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA0VDIzMzAzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY3YWMxYTE2Y2UwNjJjNWU3MmZjNGFlNjk0YzQ3NWNiNjQwZjM4Y2Y3NTBjZDVjNDVjNGYzN2MzMjFmZDVmNjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.DQojPovc_hb118uArgEJLF2RWlX4xkO54y7nxFUoTFI)](https://private-user-images.githubusercontent.com/68525320/238897690-1cde3993-77e1-4e64-8e4c-9727f1a40801.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzUzNDU3MzYsIm5iZiI6MTc3NTM0NTQzNiwicGF0aCI6Ii82ODUyNTMyMC8yMzg4OTc2OTAtMWNkZTM5OTMtNzdlMS00ZTY0LThlNGMtOTcyN2YxYTQwODAxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA0MDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNDA0VDIzMzAzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY3YWMxYTE2Y2UwNjJjNWU3MmZjNGFlNjk0YzQ3NWNiNjQwZjM4Y2Y3NTBjZDVjNDVjNGYzN2MzMjFmZDVmNjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.DQojPovc_hb118uArgEJLF2RWlX4xkO54y7nxFUoTFI)

- 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

52

—

FairBetter than 96% of packages

Maintenance80

Actively maintained with recent releases

Popularity39

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75.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 ~71 days

Recently: every ~0 days

Total

15

Last Release

105d 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

### Community

Maintainers

![](https://www.gravatar.com/avatar/9499120912b47a170291b3b795ea0255f060d8500bd2988535e4e6faccee5c8d?d=identicon)[solutionforest](/maintainers/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)")[![a21ns1g4ts](https://avatars.githubusercontent.com/u/11599205?v=4)](https://github.com/a21ns1g4ts "a21ns1g4ts (3 commits)")[![gergo85](https://avatars.githubusercontent.com/u/2959112?v=4)](https://github.com/gergo85 "gergo85 (3 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

[spatie/laravel-ciphersweet

Use ciphersweet in your Laravel project

416718.4k1](/packages/spatie-laravel-ciphersweet)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

9169.0k4](/packages/marcelweidum-filament-expiration-notice)[solution-forest/filament-email-2fa

filament-email-2fa

328.6k](/packages/solution-forest-filament-email-2fa)[guava/filament-modal-relation-managers

Allows you to embed relation managers inside filament modals.

7565.0k4](/packages/guava-filament-modal-relation-managers)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[cmsmaxinc/filament-system-versions

A comprehensive Filament plugin that provides real-time visibility into all package versions within your Filament PHP application. This essential developer tool creates a centralized dashboard where you can instantly view, monitor, and track the current versions of all installed packages in your project and what the latest version is.

1325.6k](/packages/cmsmaxinc-filament-system-versions)

PHPackages © 2026

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