Linux 软件免费装
Banner图

Nahnu Login Shield

开发者 ja1me4
更新时间 2026年11月24日 11:22
PHP版本: 8.3 及以上
WordPress版本: 7.1
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

captcha login security brute force two factor geo blocking

下载

1.0.21 1.0.20 1.0.12 1.0.11 1.0.13 1.0.14 1.0.15 1.0.10 1.0.16 1.0.17 1.0.18 1.0.19

详情介绍:

Nahnu Login Shield protects every WordPress login entry point: the login form, WooCommerce My Account, XML-RPC, the REST API and your form plugins. It is a login security plugin, not a general security suite. No subscription. No license key. No upsell. Everything is free. Brute-force lockout Early blocking An optional must-use plugin turns locked-out IPs away before WordPress loads. It is off by default and never installed automatically: click "Install early-block mu-plugin" on the General tab, and "Remove" to delete it again. CAPTCHA / verification providers One provider site-wide, shown on every protected form: OOPSpam (with VPN, data-centre and disposable-email blocking), reCAPTCHA v2 and v3, hCaptcha, Cloudflare Turnstile (managed or invisible), Friendly Captcha, Cap, mCaptcha and ALTCHA, or none. Two-factor authentication Passwordless sign-in White-label emails 2FA codes, magic links and signup confirmations use your sender name, logo, colours and footer. Subject, heading and intro are editable, with a preview and test send. Access control Geo-fencing Reads the visitor country from CDN headers (Cloudflare, Bunny.net, CloudFront, Vercel, Fastly/Akamai) with no API quota, falling back to freeipapi.com or ipinfo.io with caching. Edge blocking: Bunny.net and Cloudflare More protection WooCommerce My Account All protections extend to the My Account login, registration, lost-password, checkout and order-tracking forms, each with its own toggle. Customers get a Login & security tab to manage passkeys, 2FA and sign-in options without seeing wp-admin. The same panel is available anywhere with the [nahnls_account_security] shortcode. Form plugin integrations Bricks Builder forms (per form), SureForms (all forms or the ones you pick) and the WordPress comment form, each with its own toggle. Anything else can integrate through the developer API: template tags, shortcodes, actions and filters, REST routes under nahnls/v1 and a JavaScript API (see docs/API.md). Event log and analytics MainWP extension (coming soon) A separate companion extension for MainWP is being tested and will be released soon. It shows lockouts, failed logins, edge blocks and recent events for all your child sites in one place, and lets you change the main Login Shield settings of a site from your MainWP dashboard. Privacy IP addresses and usernames are stored in a local database table for the event log, with configurable retention. No data is sent to any Nahnu server. Third-party services you enable receive only what they need (see below). Deleting the plugin removes all stored data. External services Nahnu Login Shield works fully offline by default. Each service below is contacted only when the site administrator explicitly selects or configures it in the plugin settings. No data is ever sent to a Nahnu server. Country flags shown in the admin log are SVG files bundled with the plugin (assets/img/flags/); no flag CDN or other external image service is used. Bundled third-party libraries No scripts are loaded from a CDN. These libraries ship inside the plugin (assets/vendor/ unless noted otherwise):

安装:

  1. Upload the nahnu-login-shield folder to /wp-content/plugins/.
  2. Activate through Plugins in the WordPress admin.
  3. Go to Settings > Login Shield to configure.
Quick start:
  1. On the Widget tab, choose a CAPTCHA provider (or leave it as None to use lockout only).
  2. On the Lockout tab, review the attempt thresholds.
  3. On the Geo tab, enable geo-blocking and select blocked countries if needed.
  4. On the Integrations tab, enable protections for WooCommerce My Account, Bricks Builder forms, SureForms and WordPress comments as needed.
  5. On the Edge Blocking tab, connect your Bunny.net or Cloudflare account to push blocks to the edge.
To use OOPSpam, install and activate the OOPSpam Anti-Spam plugin and enter your API key there first. Nahnu Login Shield detects it automatically.

屏幕截图:

  • Widget tab — pick the CAPTCHA provider: OOPSpam, reCAPTCHA v2/v3, hCaptcha, Turnstile or Friendly Captcha, or none.
  • Lockout tab — failed-attempt limits, escalation to long lockouts, the lockout message and proxy header settings.
  • Edge Blocking tab — push lockouts and honeypot hits to Bunny.net or Cloudflare so attackers are stopped at the edge.
  • Log tab — every login attempt, lockout and block, with search, filters, one-click block or unlock, and CSV export.
  • Analytics tab — failed attempts, lockouts, honeypot hits and successful logins over 30 days, with the busiest hours and top attacking IPs.
  • 2FA tab — two-factor authentication for the roles you choose, with email codes as the baseline and authenticator apps or passkeys as stronger options.
  • Login & security page — where each user adds passkeys, sets up an authenticator app, gets backup codes and chooses how they sign in.
  • Passwordless tab — magic login links and passkeys (WebAuthn), each with its own role limits.
  • The login page with passkey sign-in and "Email me a login link".
  • Geo tab — block the login form by country using CDN geo headers or an IP lookup service.
  • Access tab — disable XML-RPC, restrict roles to IP addresses, and set login and logout redirects.
  • Integrations tab — WooCommerce My Account forms, plus Bricks Builder, SureForms and WordPress comment protection.
  • Checklist tab — a security score with one-click fixes.
  • Settings tab — log retention and white-label email branding for every email the plugin sends.

升级注意事项:

1.0.21 Removes three PHP warnings logged on each visit to a custom login address. No settings changes. 1.0.20 Security fixes for the CAPTCHA and JavaScript checks, and a new Visitor IP header setting. If you use a CDN, choose its header on the Lockout tab after updating. 1.0.19 Batched edge blocking, an optional strict JavaScript check, and the early-block mu-plugin now updates itself with the plugin. 1.0.18 Faster login handling under heavy bot traffic; adds two small database tables automatically. If you use the early-block mu-plugin, click "Update mu-plugin" after updating. 1.0.17 Lower CPU use under bot traffic. If you use the early-block mu-plugin, click "Update mu-plugin" on the settings page after updating. 1.0.16 Stops password managers from prompting to update your login on the plugin's admin pages. 1.0.15 Better right-to-left display of the account security panel.

常见问题:

Do I need OOPSpam installed?

No. OOPSpam is one of seven CAPTCHA provider options. All other providers and all other features work independently.

Does this plugin slow down my site?

No. Assets load only on wp-login.php and any pages you opt into via the Integrations tab. The JS check uses a tiny inline script with no external request. Geo lookups from CDN headers are zero-latency. API fallback results are cached per IP for a configurable period. If you opt in to the early-block mu-plugin, it turns away locked-out IPs before WordPress fully loads.

What happens if the CAPTCHA API goes down?

All providers fail open. A network or API error never locks out legitimate users.

Will this conflict with other security plugins?

It hooks specifically into WordPress login actions and standard WooCommerce and form-plugin hooks. If another plugin hooks the same actions it may conflict. Open a support thread with details if you see an issue.

Can I use this without any CAPTCHA?

Yes. Set the provider to None. Geo-blocking, brute-force lockout, honeypot username trapping, the JS presence check, and 2FA all work independently of CAPTCHA.

Does it work with WooCommerce?

Yes. The WooCommerce My Account login, registration, lost-password, checkout, and order-tracking forms each have their own toggle in the WooCommerce section of the Integrations tab.

I locked myself out. How do I get back in?

Two options. First, add define( 'NAHNLS_BYPASS_IP', 'your.ip.address' ); to wp-config.php (above the "That's all, stop editing" line). It accepts a comma-separated list of IPs and CIDR ranges, and exempts them from lockouts, the IP blocklist, geo blocking and the early-block rate limit - no deactivation needed. Second, rename the plugin folder from nahnu-login-shield to _nahnu-login-shield via SFTP, which deactivates it. If you are stuck at the two-factor step instead, see the next question.

Can I put my own username on the honeypot list?

Yes, and it is a good idea: usernames are public (author pages, feeds, the REST API), so bots try them. Add your username to the Honeypot list on the Lockout tab and sign in with your email address from then on. Anyone who tries the username is locked out like a bot. Email addresses of real accounts are never blocked, so patterns like admin@* do not affect your own sign-in. The Lockout tab lists which entries are real accounts and reminds you if your own username is on the list. If you get locked out anyway, add define( 'NAHNLS_DISABLE_HONEYPOT', true ); to wp-config.php (above the "That's all, stop editing" line) to switch the honeypot list off, sign in, fix the list, then remove the line. To clear an IP that is already locked, also see the question above.

I can't receive the 2FA email / I'm locked out

When two-factor authentication is on, every sign-in asks for a code, and email codes are the baseline. If the email does not arrive (a mail problem on the server, spam filtering), first try a backup code or "Email me a code" again. If that does not help, add define( 'NAHNLS_DISABLE_2FA', true ); to wp-config.php (above the "That's all, stop editing" line). This switches the 2FA check off for everyone, so you can sign in with just your password; the plugin's settings page shows a notice while it is set. Fix email delivery (an SMTP plugin usually does it), add an authenticator app on your Login & security page so you are not dependent on email, then remove the line. Note: NAHNLS_BYPASS_IP does NOT bypass 2FA - it only exempts addresses from lockouts, the IP blocklist, geo blocking and the early-block rate limit.

Can my login, registration and My Account pages be cached?

Mostly yes. Every protected form carries a hidden security token that lives about a day. On page load the plugin's small script fetches a fresh token (one request to admin-ajax.php), so pages served from a full-page cache keep working as long as JavaScript runs - including cached blog posts with a comment form. Without JavaScript, a cached copy of the form older than a day fails the security check and asks the visitor to reload. Login, registration and My Account pages should still be excluded from full-page caching (WooCommerce requires this anyway). Developers can lengthen the token life with the nahnls_form_nonce_life filter.

Is this compatible with multisite?

It is not tested on multisite and is not recommended for network activation.

How does geo-blocking work when I do not use a CDN?

It falls back to one of two free IP geolocation APIs (freeipapi.com or ipinfo.io) with a configurable cache. CDN headers are always checked first and take priority.

How do I get a new form plugin supported?

Open a support thread or submit a request at https://nahnuloginshield.com/support/. Bricks Builder, SureForms and WordPress comments are the supported integrations today; anything else can be wired up through the developer API (docs/API.md) while a request is considered.

What is the mu-plugin and is it safe to have?

The mu-plugin is optional and opt-in. Nothing is copied until you, as an administrator, click Install early-block mu-plugin on the General tab. That button copies nahnls-early-block.php from the plugin folder into your must-use plugins directory (WPMU_PLUGIN_DIR, normally wp-content/mu-plugins/). The file checks whether the requesting IP is locked out or rate-limited and, if so, sends a 403/429 response before WordPress fully loads — dramatically reducing server load during bot floods. The General tab shows whether it is installed, not installed or outdated; after a plugin update you are offered an Update mu-plugin button (it is never refreshed automatically). Clicking Remove deletes the file, and it is also removed on plugin deactivation and deletion. If the directory is not writable, the settings page shows manual copy instructions instead. The per-IP rate-limit counters the mu-plugin uses are tiny text files stored inside your WordPress uploads directory at wp-content/uploads/nahnu-login-shield/ratelimit/ (protected by an index.php and .htaccess; files older than five minutes are pruned automatically). Nothing is written outside the WordPress installation; the folder is deleted when the plugin is uninstalled.

Can attackers bypass the lockout by rotating IPs?

The per-username lockout catches this: if the same username is attempted from too many different IPs within the time window, the username itself is locked regardless of IP. Adding common targets (admin, administrator, root) to the Honeypot username list gives the strongest protection — one attempt from any IP is enough to lock both the IP and the username globally.

更新日志:

1.0.21 1.0.20 Security release. If your site is behind a CDN or proxy, choose its header in the new "Visitor IP header" setting (Lockout tab). If you use the early-block mu-plugin, it updates itself. 1.0.19 Third performance release, for very high login volumes. Earlier versions: see changelog.txt in the plugin folder.