PHPackages                             stokoe/ip-whitelist - 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. stokoe/ip-whitelist

ActiveLibrary[Security](/categories/security)

stokoe/ip-whitelist
===================

0.0.2(2mo ago)03proprietaryPHPPHP ^8.3

Since Nov 14Pushed 2mo agoCompare

[ Source](https://github.com/Michael-Stokoe/statamic-ip-whitelist)[ Packagist](https://packagist.org/packages/stokoe/ip-whitelist)[ RSS](/packages/stokoe-ip-whitelist/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

IP Whitelist for Statamic
=========================

[](#ip-whitelist-for-statamic)

A comprehensive IP whitelist addon for Statamic 6 that provides robust access control for your control panel and custom routes.

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 12+
- Statamic 6+

Features
--------

[](#features)

- 🛡️ **Control Panel Protection** - Automatically protects Statamic CP routes
- 🎨 **Dark/Light Mode Support** - Seamless integration with Statamic's theme system
- 💾 **Flexible Storage** - Choose between file-based or database storage
- 🌐 **Advanced IP Matching** - Supports CIDR notation, wildcards, and exact matches
- ⚡ **Artisan Commands** - Manage whitelist via command line
- 🔧 **Configurable Routes** - Protect additional custom routes
- 🏠 **Local Development Bypass** - Optional bypass for local environments
- 📊 **Beautiful Interface** - Modern, responsive control panel interface

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

[](#installation)

1. `composer require stokoe/ip-whitelist`
2. Publish the configuration file:

```
php artisan vendor:publish --tag=ip-whitelist-config
```

3. Run migrations (if using database storage):

```
php artisan migrate
```

4. Configure your settings in `config/ip-whitelist.php`

Configuration
-------------

[](#configuration)

### Storage Options

[](#storage-options)

Choose between file or database storage:

```
// File storage (default)
'storage' => 'file',

// Database storage
'storage' => 'database', // Don't forget to run the migrations!
```

### Protected Routes

[](#protected-routes)

Add additional routes to protect:

```
'protected_routes' => [
    'admin/*',
    'api/admin/*',
    'custom-admin/*',
],
```

### Local Development

[](#local-development)

Bypass whitelist in local environment:

```
'bypass_local' => true, // Set to false to enforce in local
```

Usage
-----

[](#usage)

### Control Panel Interface

[](#control-panel-interface)

1. Navigate to **Tools &gt; IP Whitelist** in the Statamic control panel
2. Add, edit, or remove IP addresses through the intuitive interface
3. View statistics and current IP information

### Artisan Commands

[](#artisan-commands)

Add an IP address:

```
php artisan ip-whitelist:manage add 192.168.1.100 --name="Office Network"
```

Remove an IP address:

```
php artisan ip-whitelist:manage remove 192.168.1.100
```

List all whitelisted IPs:

```
php artisan ip-whitelist:manage list
```

### IP Address Formats

[](#ip-address-formats)

The addon supports multiple IP address formats:

- **Exact IP**: `192.168.1.100`
- **CIDR Notation**: `192.168.1.0/24`
- **Wildcards**: `192.168.1.*` (Allows 192.168.1.1, 192.168.1.2, \[...\], 192.168.1.255)

Permissions
-----------

[](#permissions)

The addon creates a `manage ip whitelist` permission. Assign this to users who should be able to manage the IP whitelist.

Security Considerations
-----------------------

[](#security-considerations)

- Always add your current IP before enabling the whitelist
- Test access from different locations before deploying
- Consider using CIDR notation for office networks

File Storage Location
---------------------

[](#file-storage-location)

When using file storage, IP addresses are stored in:

```
storage/app/ip-whitelist.json

```

Database Storage
----------------

[](#database-storage)

When using database storage, IP addresses are stored in the `whitelisted_ips` table with the following structure:

- `id` - Primary key
- `ip` - IP address or pattern
- `name` - Optional description
- `active` - Boolean status
- `user_id` - The ID of the user who added the IP
- `created_at` / `updated_at` - Timestamps

Troubleshooting
---------------

[](#troubleshooting)

### Locked Out of Control Panel

[](#locked-out-of-control-panel)

If you're locked out:

1. Add your IP via Artisan command:

```
php artisan ip-whitelist:manage add YOUR_IP_ADDRESS
```

2. Or temporarily disable the middleware by setting `bypass_local` to `true` in local environment (Only works in local dev)
3. Or directly edit the storage file/database to add your IP

### Local Development Issues

[](#local-development-issues)

Ensure `bypass_local` is set to `true` in your configuration for local development.

Support
-------

[](#support)

For issues or feature requests, please check the addon documentation or raise a Github issue.

###  Health Score

37

—

LowBetter than 82% of packages

Maintenance91

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

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.

###  Release Activity

Cadence

Every ~103 days

Total

2

Last Release

72d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e983375a114dbe4a5808311fcb8f73e05c6e9201f7dd856ebeee0dde824dad30?d=identicon)[stokoe](/maintainers/stokoe)

---

Top Contributors

[![Michael-Stokoe](https://avatars.githubusercontent.com/u/2981213?v=4)](https://github.com/Michael-Stokoe "Michael-Stokoe (8 commits)")

### Embed Badge

![Health badge](/badges/stokoe-ip-whitelist/health.svg)

```
[![Health](https://phpackages.com/badges/stokoe-ip-whitelist/health.svg)](https://phpackages.com/packages/stokoe-ip-whitelist)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M212](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M112](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

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

Realistic password strength estimation PHP library based on Zxcvbn JS

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

The Illuminate Encryption package.

9229.7M278](/packages/illuminate-encryption)

PHPackages © 2026

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