LunarShield

By moonbaseoneit

0+ active installationsVersion 1.0.2

Security hardening utilities for WordPress, including rate limiting, uploads hardening, and admin security settings.

Description

LunarShield helps site administrators reduce common attack surfaces with a focused set of hardening controls:

  • Login rate limiting with block tracking
  • Correct visitor IPs behind Cloudflare, load balancers and reverse proxies
  • Uploads directory PHP execution protection
  • Optional WordPress version hiding
  • Admin settings and reports pages with capability checks

Installation

  1. Upload the plugin files to /wp-content/plugins/lunarshield, or install through the WordPress plugins screen.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. Go to LunarShield in wp-admin to configure security settings.

FAQ

Does this plugin require command line tools?

No. End users can install and configure LunarShield from WordPress admin.

My site is behind Cloudflare or a proxy. What should I set?

Go to LunarShield → Settings → Client IP detection. The “Detected IP” row shows the address your
request came from and the address LunarShield uses for you. If your site uses Cloudflare’s proxy
(orange cloud), click “Use Cloudflare settings”. For your own load balancer or reverse proxy, choose
the header it sets (usually X-Forwarded-For) and add its IP addresses under “Trusted proxies”.
Headers are only believed for requests that arrive from a trusted proxy, so visitors cannot fake
their address. Leave the default if your site is not behind a proxy.

Is this multisite compatible?

Not yet. Multisite support is planned for a future release.

Changelog

1.0.2

  • New: Client IP detection settings for sites behind Cloudflare, load balancers or reverse proxies. The login rate limiter now blocks the real visitor instead of the proxy’s shared address.
  • New: “Detected IP” status on the settings page, with a one-click “Use Cloudflare settings” when your request comes through Cloudflare.
  • Security: forwarded headers are only trusted from proxies you trust; IPv6 addresses are normalized so one visitor cannot appear as several.

1.0.1

  • Fix: enabling “Disable PHP execution in uploads” no longer causes a fatal error on sites where FS_CHMOD_FILE is not defined.
  • Tested with WordPress 7.0 and 7.1.
  • Admin stylesheet is now versioned with the plugin version for correct cache busting.

1.0.0

  • Initial stable release.