fof/ban-ips
Composer 安装命令:
composer require fof/ban-ips
包简介
Ban IP addresses from your forum
关键字:
README 文档
README
A Flarum 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
- 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 is enabled, banned-IP records are included in data exports and decoupled from users on erasure (the IP itself stays banned).
Permissions
The extension adds two permissions, configurable per group in the admin panel:
| Permission | Description |
|---|---|
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
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
Install with Composer:
composer require fof/ban-ips:"*"
Updating
composer update fof/ban-ips
Then clear the cache:
php flarum cache:clear
Issues
Links
An extension by FriendsOfFlarum, commissioned by webdeveloper.com.
fof/ban-ips 适用场景与选型建议
fof/ban-ips 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 37.52k 次下载、GitHub Stars 达 5, 最近一次更新时间为 2019 年 08 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「flarum」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 fof/ban-ips 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fof/ban-ips 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 fof/ban-ips 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Adds more BBCode
Output of discussions lists in form of cards
Allow users to log in with QQ
A headless CLI performance benchmarking tool for Flarum
The admin panel of afrux/asirem
Enhanced typography for french writings, mainly around punctuation.
统计信息
- 总下载量: 37.52k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 18
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-08-04