PHPackages                             fof/ban-ips - 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. fof/ban-ips

ActiveFlarum-extension[Security](/categories/security)

fof/ban-ips
===========

Ban IP addresses from your forum

1.2.0(1mo ago)537.4k↓31.9%4[1 PRs](https://github.com/FriendsOfFlarum/ban-ips/pulls)MITPHPPHP ^8.0CI passing

Since Apr 27Pushed 1w ago3 watchersCompare

[ Source](https://github.com/FriendsOfFlarum/ban-ips)[ Packagist](https://packagist.org/packages/fof/ban-ips)[ Docs](https://friendsofflarum.org)[ Fund](https://opencollective.com/fof/donate)[ RSS](/packages/fof-ban-ips/feed)WikiDiscussions 2.x Synced 3d ago

READMEChangelog (10)Dependencies (8)Versions (32)Used By (0)

Ban IPs by FriendsOfFlarum
==========================

[](#ban-ips-by-friendsofflarum)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667) [![Latest Stable Version](https://camo.githubusercontent.com/c48923a26d3551242d3f50b9fafcf0745e028c6e05f533e745b8e4882671ec3c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666f662f62616e2d6970732e737667)](https://packagist.org/packages/fof/ban-ips) [![OpenCollective](https://camo.githubusercontent.com/1903c197bb0307e60d6328653532b8a6b9890b898fbc92e314ab39d699491e74/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6f70656e636f6c6c6563746976652d666f662d626c75652e737667)](https://opencollective.com/fof/donate) [![Donate](https://camo.githubusercontent.com/6c7b26396e320eb8dd60d767a4500684b60bb7d37f7cacbaf6b2eae6f2d30010/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f6e6174652d6461746974697365762d696d706f7274616e742e737667)](https://datitisev.me/donate)

A [Flarum](http://flarum.org) extension that lets moderators ban IP addresses, blocking the people behind them from logging in or registering.

Unlike Flarum's built-in user suspension — which only stops a known account — banning an IP shuts the door on the address itself. This is useful against ban-evaders who keep creating new accounts, and against spammers and bots registering from the same network.

Features
--------

[](#features)

- **Ban an individual IP address** directly from the admin panel, with an optional reason.
- **Ban a user by their IP(s)** straight from a post or the user's profile. You can choose to ban only the IP of the post in question, or every IP the user has ever posted from.
- **Catch shared accounts.** Before banning, the extension shows you which *other* accounts have posted from the same IP address(es) so you know exactly who a ban will affect.
- **Blocks login *and* registration** from banned IPs. Banned users are also signed out the moment they make a request from a banned address.
- **Won't lock out staff.** Users (and admins) who hold the ban permission can never be IP-banned, and a banned IP never blocks a non-banned user who simply happens to share it.
- **"Banned" badge** displayed next to affected users so moderators can spot them at a glance.
- **Manage existing bans** from the admin page: review the creator, associated user, address, reason and date, edit the reason, or remove a ban.
- **GDPR aware.** When [FoF GDPR](https://github.com/FriendsOfFlarum/gdpr) is enabled, banned-IP records are included in data exports and decoupled from users on erasure (the IP itself stays banned).

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

[](#permissions)

The extension adds two permissions, configurable per group in the admin panel:

PermissionDescription**Ban IP addresses** (`fof.ban-ips.banIP`)Create, edit and remove IP bans, and ban/unban users by IP. A moderator cannot edit a ban they created themselves, nor ban another user who also holds this permission.**View banned IP address list** (`fof.ban-ips.viewBannedIPList`)View the list of banned IPs in the admin panel and the banned IPs associated with a user.How it works
------------

[](#how-it-works)

A "ban" is a record of an IP address. On every forum request the extension checks the visitor's address:

- Requests to **register** or **log in** from a banned IP are rejected — unless the account being logged into is not itself associated with a banned IP.
- An authenticated user making a request from a banned IP is logged out.

When you ban a user, the extension looks up every IP address they have posted from and bans each one, so a single action covers all of the user's known addresses.

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

[](#installation)

Install with Composer:

```
composer require fof/ban-ips:"*"
```

Updating
--------

[](#updating)

```
composer update fof/ban-ips
```

Then clear the cache:

```
php flarum cache:clear
```

Issues
------

[](#issues)

- [Open an issue on GitHub](https://github.com/FriendsOfFlarum/ban-ips/issues)

Links
-----

[](#links)

[![OpenCollective](https://camo.githubusercontent.com/8ea53c451470d1a72789d650c77e2b22eee915f7fbf2cbeeeeaa25f47301efe2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f6e6174652d667269656e64736f66666c6172756d2d3434414545353f7374796c653d666f722d7468652d6261646765266c6f676f3d6f70656e2d636f6c6c656374697665)](https://opencollective.com/fof/donate) [![GitHub](https://camo.githubusercontent.com/19562cc0996a556a7abda08327f57924e288bbbc3c5312b096c62175a2841ae4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f6e6174652d6461746974697365762d6561346161613f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562)](https://datitisev.me/donate/github)

- [Packagist](https://packagist.org/packages/fof/ban-ips)
- [GitHub](https://github.com/FriendsOfFlarum/ban-ips)

An extension by [FriendsOfFlarum](https://github.com/FriendsOfFlarum), commissioned by [webdeveloper.com](https://webdeveloper.com).

###  Health Score

61

—

FairBetter than 98% of packages

Maintenance96

Actively maintained with recent releases

Popularity35

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~131 days

Recently: every ~144 days

Total

20

Last Release

31d ago

Major Versions

0.4.0 → 1.0.02021-06-25

1.x-dev → 2.0.0-beta.12026-06-03

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16573496?v=4)[IanM](/maintainers/imorland)[@imorland](https://github.com/imorland)

![](https://avatars.githubusercontent.com/u/1630413?v=4)[Gregor Hammerschmidt](/maintainers/GreXXL)[@GreXXL](https://github.com/GreXXL)

![](https://www.gravatar.com/avatar/0538135c1debcef5602dce7ece027909cc832b7a6284ab9189a19aa8de98d60d?d=identicon)[clarkwinkelmann](/maintainers/clarkwinkelmann)

![](https://www.gravatar.com/avatar/1298cdc0b2402a1aa34fb75a254947d655e090d62bd0531311331d369cac934e?d=identicon)[datitisev](/maintainers/datitisev)

---

Top Contributors

[![dsevillamartin](https://avatars.githubusercontent.com/u/6401250?v=4)](https://github.com/dsevillamartin "dsevillamartin (43 commits)")[![imorland](https://avatars.githubusercontent.com/u/16573496?v=4)](https://github.com/imorland "imorland (22 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (20 commits)")[![flarum-bot](https://avatars.githubusercontent.com/u/39334649?v=4)](https://github.com/flarum-bot "flarum-bot (16 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (3 commits)")[![karaok491](https://avatars.githubusercontent.com/u/72854852?v=4)](https://github.com/karaok491 "karaok491 (2 commits)")[![davwheat](https://avatars.githubusercontent.com/u/7406822?v=4)](https://github.com/davwheat "davwheat (1 commits)")[![DavideIadeluca](https://avatars.githubusercontent.com/u/146922689?v=4)](https://github.com/DavideIadeluca "DavideIadeluca (1 commits)")[![oaklinq](https://avatars.githubusercontent.com/u/46486944?v=4)](https://github.com/oaklinq "oaklinq (1 commits)")[![rob006](https://avatars.githubusercontent.com/u/5972388?v=4)](https://github.com/rob006 "rob006 (1 commits)")[![askvortsov1](https://avatars.githubusercontent.com/u/38059171?v=4)](https://github.com/askvortsov1 "askvortsov1 (1 commits)")

---

Tags

flarumfriendsofflarumhacktoberfestflarum

### Embed Badge

![Health badge](/badges/fof-ban-ips/health.svg)

```
[![Health](https://phpackages.com/badges/fof-ban-ips/health.svg)](https://phpackages.com/packages/fof-ban-ips)
```

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12128.3k](/packages/flarum-lang-russian)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1938.7k](/packages/flarum-lang-french)[fof/recaptcha

Increase your forum's security with Google reCAPTCHA

1437.4k](/packages/fof-recaptcha)[fof/discussion-language

Specify the language a discussion is written in &amp; sort by language

1034.8k4](/packages/fof-discussion-language)

PHPackages © 2026

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