PHPackages                             coosos/ip-filter-bundle - 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. [Search &amp; Filtering](/categories/search)
4. /
5. coosos/ip-filter-bundle

ActiveSymfony-bundle[Search &amp; Filtering](/categories/search)

coosos/ip-filter-bundle
=======================

Symfony 4 &amp; 5 Ip Filter Bundle

4.1.0(6y ago)06MITPHPPHP &gt;=7.1.3CI failing

Since Nov 29Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Coosos/IpFilterBundle)[ Packagist](https://packagist.org/packages/coosos/ip-filter-bundle)[ Docs](https://github.com/Coosos/IpFilterBundle)[ RSS](/packages/coosos-ip-filter-bundle/feed)WikiDiscussions master Synced today

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

IpFilterBundle
==============

[](#ipfilterbundle)

*Note : This project was forked from [Spomky-Labs/IpFilterBundle](https://github.com/Spomky-Labs/IpFilterBundle) because is abandoned.*

[![Build Status](https://camo.githubusercontent.com/b1f71d2aaa8c12a674623910ad2278c6c52893f14abca290f220560892efa28f/68747470733a2f2f7472617669732d63692e636f6d2f436f6f736f732f497046696c74657242756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Coosos/IpFilterBundle)

Description
-----------

[](#description)

This bundle will help you to restrict access of your application using `IP addresses` and `ranges of IP addresses`.

It supports both `IPv4` and `IPv6` addresses and multiple environments.

For example, you can grant access of a range of addresses from `192.168.1.1` to `192.168.1.100` on `dev` and `test` environments and deny all others.

**Please note that this bundle has bad results in term of performance compared to similar functionality offered by a `.htaccess` file for example.**

This bundle required or used
----------------------------

[](#this-bundle-required-or-used)

PackageVersionPHP^7.1Symfony^4.0|~5.0Doctrine^2.6Policy
======

[](#policy)

Please note that authorized IPs have a higher priority than unauthorized ones. For example, if range `192.168.1.10` to `192.168.1.100` is **unauthorized** and `192.168.1.20` is **authorized**, then `192.168.1.20` will be granted.

Installation
============

[](#installation)

Installation is a quick 4 steps process:

- Download the bundle
- Enable the Bundle
- Create your model class
- Configure the application

\##Step 1: Install the bundle##

The preferred way to install this bundle is to rely on Composer:

```
composer require "coosos/ip-filter-bundle" "~4.1"
```

\##Step 2: Enable the bundle##

Enable the bundle in `config/bundles.php`:

```
