跳至内容
WordPress.org

China 简体中文

  • 主题
  • 插件
  • 新闻
    • 文档
    • 论坛
  • 关于
  • 获取 WordPress
获取 WordPress
WordPress.org

Plugin Directory

Block Logins with Cloudflare

  • 提交插件
  • 我的收藏
  • 登录
  • 提交插件
  • 我的收藏
  • 登录

Block Logins with Cloudflare

作者:supersoju
下载
  • 详情
  • 评价
  • 安装
  • 开发进展
支持

描述

Block Logins with Cloudflare helps protect your WordPress site from brute-force attacks by blocking IPs at the Cloudflare firewall after a configurable number of failed login attempts.

  • Block IPs via Cloudflare after X failed login attempts
  • Block IPs that generate excessive 404 responses (bots and scanners)
  • Block IPs attacking via XML-RPC with intelligent detection
  • Automatic unblocking after a configurable duration
  • Whitelist IPs to never block or track them (supports IPv6 CIDR ranges)
  • View and manually unblock blocked IPs from the admin
  • Block source tracking — see whether each IP was blocked via login, XML-RPC, or 404
  • Secure settings page with Cloudflare API token validation
  • Hourly cron job for automatic maintenance

External Services

This plugin relies on the Cloudflare API to function. It communicates with Cloudflare’s external servers to block IP addresses at the firewall level.

What is the Cloudflare API and what is it used for?
The Cloudflare API is a RESTful service provided by Cloudflare, Inc. that allows programmatic management of Cloudflare firewall rules. This plugin uses it to automatically block and unblock IP addresses based on failed login attempts, XML-RPC attacks, and 404 scanning activity.

What data is sent and when?
The plugin sends the following data to Cloudflare’s API servers:

  1. During settings validation (when you save Cloudflare credentials):

    • Your Cloudflare API token (for verification)
    • Endpoint: https://api.cloudflare.com/client/v4/user/tokens/verify
  2. When blocking an IP (after a threshold is reached):

    • The IP address to be blocked
    • Your Cloudflare email address and API key/token
    • Your Cloudflare Zone ID
    • A note describing the reason for the block
    • Endpoint: https://api.cloudflare.com/client/v4/zones/{zone_id}/firewall/access_rules/rules

No personally identifiable information about your WordPress users is transmitted. Only IP addresses are sent to Cloudflare.

Service provider information:
– Service: Cloudflare API
– Provider: Cloudflare, Inc.
– Terms of Service: https://www.cloudflare.com/terms/
– Privacy Policy: https://www.cloudflare.com/privacypolicy/
– API Documentation: https://developers.cloudflare.com/api/

Required for functionality:
This plugin requires a Cloudflare account and will not function without valid Cloudflare API credentials. The external API calls are essential to the plugin’s core functionality.

License

GNU General Public License v2 or later

安装

  1. Upload the plugin files to the /wp-content/plugins/block-logins-cf directory, or install through the WordPress plugins screen.
  2. Activate the plugin through the ‘Plugins’ screen.
  3. Go to Block Logins CF in the admin sidebar to configure your Cloudflare credentials and settings.

常见问题

What permissions does my Cloudflare API token need?

Your token needs Zone.Zone and Zone.Firewall permissions for the relevant zone.

Where do I find my Cloudflare Zone ID?

In your Cloudflare dashboard, select your domain and look for the Zone ID in the Overview tab.

Does this block at the Cloudflare level or just WordPress?

This plugin blocks IPs at the Cloudflare firewall, stopping attacks before they reach your server.

What does 404 blocking protect against?

It detects bots and vulnerability scanners that probe your site by requesting many non-existent URLs. When an IP exceeds the configurable 404 threshold, it is blocked via Cloudflare just like a brute-force login attacker.

评价

此插件暂无评价。

贡献者及开发者

「Block Logins with Cloudflare」是开源软件。 以下人员对此插件做出了贡献。

贡献者
  • supersoju

帮助将「Block Logins with Cloudflare」翻译成简体中文。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志。

更新日志

1.1

  • Added 404-based IP blocking to detect and block bots and vulnerability scanners
  • Added XML-RPC protection with intelligent attack detection
  • Added block source tracking — blocked IPs now show whether they were blocked via login, XML-RPC, or 404
  • Added 404 activity log in the Blocked IPs admin page
  • Added IPv6 CIDR range support in the IP whitelist
  • Added caching for Cloudflare API token validation to prevent throttling

1.0

  • Initial release

额外信息

  • 版本 1.2
  • 最后更新:4 周前
  • 活跃安装数量 不到10
  • WordPress 版本 6.0 或更高版本
  • 已测试的最高版本为 7.0
  • PHP 版本 7.4 或更高版本
  • 语言
    English (US)
  • 标签
    Brute Forcecloudflarefirewallloginsecurity
  • 高级视图

评级

尚未提交反馈。

Your review

查看全部评论

贡献者

  • supersoju

支持

有话要说吗?是否需要帮助?

查看支持论坛

  • 关于
  • 新闻
  • 主机
  • 隐私
  • 陈列窗
  • 主题
  • 插件
  • 区块样板
  • 学习
  • 支持
  • 开发者
  • WordPress.tv ↗︎
  • 参与
  • 活动
  • 捐赠 ↗
  • 未来五分计划
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

China 简体中文

  • 关注我们的 X(原 Twitter)账号
  • 访问我们的 Bluesky 账号
  • 关注我们的 Mastodon 账号
  • 访问我们的 Threads 账号
  • 访问我们的 Facebook 公共主页
  • 关注我们的 Instagram 账号
  • 关注我们的 LinkedIn 主页
  • 访问我们的 TikTok 账号
  • 访问我们的 YouTube 频道
  • 访问我们的 Tumblr 账号
代码如诗
The WordPress® trademark is the intellectual property of the WordPress Foundation.