Linux 软件免费装

Mcpelee Site Security Guard

开发者 mcpelee
更新时间 2026年10月24日 19:26
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

security ip blocking access log country blocking file integrity

下载

1.0.0 1.1.0

详情介绍:

Mcpelee Site Security Guard provides access control and security monitoring through Settings > Mcpelee Site Security Guard. The dashboard includes IP blocking, security settings, file scanning, and logs. The administration interface is currently in Korean. Features Server requirements WordPress 6.0 or later, PHP 8.0 or later, and a single-site installation are required. Server-level blocking requires Apache 2.4 with mod_rewrite, mod_headers, AllowOverride FileInfo, or a compatible LiteSpeed configuration. The site home .htaccess, the rewrite root returned by get_home_path(), must be writable. Saving the IP policy generates both blocking and static-page header rules in a plugin-managed section. No hidden .htaccess file is shipped inside the plugin. Nginx and the PHP development server do not process .htaccess. PHP fallback protection applies to WordPress requests, not every static file. A CDN that serves responses before reaching the origin needs its own access rules. Trusted proxies must restore the real client IP at the server level. Country blocking requires a server GeoIP module and database providing MM_COUNTRY_CODE or GEOIP_COUNTRY_CODE before rewrite processing. The plugin does not install these dependencies. Requests with unknown countries are not country-blocked. IP allow rules take priority over IP block rules, followed by country allow exceptions and country blocks. A country allow list is not an exclusive list of permitted countries. Storage and retention Optional access logs store the IP, request method, URL path, and response status. Query strings, request bodies, passwords, and cookies are not logged. Sensitive data embedded in URL paths may still be recorded. Access logging adds one database write per WordPress request. Requests blocked by the web server are available in server logs, not plugin logs. Logs default to seven days of retention, configurable from 1 to 90 days. Hourly cleanup retains at most 20,000 recent records; the count can exceed this between cleanup runs. File scans store paths and hashes, not original file contents. Detected changes are investigation clues, not proof of intrusion or a malware diagnosis. Deactivation removes the plugin-managed server rules and scheduled tasks. Settings, logs, country cache, file baselines, and administrator preferences remain in the database after deactivation or deletion. Distribution and compatibility Classes and constants use MCPELEE_SSG_; hooks, options, caches, and database tables use mcpelee_ssg_. Internal filenames and CSS identifiers use mcpelee-ssg-. Legacy development identifiers are recognized only for migration or compatibility. Standard WordPress filenames, the main plugin filename, and the static error page URL remain stable. Developer tests and build scripts are excluded from the release ZIP. No custom Update URI header is used.

安装:

  1. Upload the release ZIP using Plugins > Add New, or copy its mcpelee-site-security-guard folder into wp-content/plugins.
  2. Activate Mcpelee Site Security Guard.
  3. Open Settings > Mcpelee Site Security Guard and add your fixed administrator IP to the IP allow list.
  4. Enter blocked IPs or CIDRs and save the IP/country policy to apply server rules.
  5. Verify redirects from an actual blocked IP and normal access from an allowed IP.
  6. Run the first file scan to establish a baseline, then enable the desired security, logging, and scheduled scan options.
When replacing a development build, back up files and the database first. Replace the entire plugin folder so obsolete files, including tests, do not remain. Development-table migration requires database permission to rename tables. Older MU-plugin loaders must be removed before activating this plugin.

升级注意事项:

1.0.0 Initial release. Back up files and the database before replacing a development build. Replace the entire folder to remove obsolete files. Schema migration may require table rename permissions.

常见问题:

Does the suspicious request filter confirm attacks?

No. It classifies saved access-log paths using heuristic rules and shows a reason. Legitimate REST user queries and network administration requests may match. Status codes, countries, ordinary home-page requests, and login-page visits alone are not signals. Query strings and request bodies are not stored and cannot be analyzed. Existing logs are classified at query time, without changing records or automatically blocking visitors. Upload execution detection recognizes paths containing an uploads directory; custom upload URL names may not match. Numbered pages show 50 records per page and preserve the active filters and sorting. Counts reflect the filtered dataset; incoming logs or retention cleanup can change page contents between requests.

Does activation enable every feature?

Basic security headers and repeated-login-failure protection are enabled by default. Configure and save IP rules separately. Access logging, external country lookup, and daily scanning are optional.

Does country blocking use the external country lookup service?

No. Country blocking uses server GeoIP environment variables. The optional external lookup only enriches log displays. Without server GeoIP information, country blocking does not work.

When do file scans run?

Scans start manually or through the optional daily schedule and continue in bounded WP-Cron batches. Low-traffic sites may need a server cron job to trigger WP-Cron reliably. Symbolic links, certain cache and upgrade directories, and files larger than 16 MB are excluded. In uploads, only executable or active-content extensions are checked. The first baseline does not prove the files are safe.

How do I recover from administrator lockout?

Using SSH or your hosting file manager, remove the root .htaccess section between # BEGIN MCPELEE Site Security Guard and # END MCPELEE Site Security Guard. Remove any remaining development-era Site Security Guard section too. Temporarily add define('MCPELEE_SSG_EMERGENCY_DISABLE', true); before WordPress loads in wp-config.php, correct the rules, and remove the constant afterward. This constant alone cannot bypass Apache rules.

Is the current-IP exclusion preference remembered?

Yes. The choice is saved per administrator and site, including the unchecked state. Apply the query to refresh the list. Filtering does not delete records.

更新日志:

1.1.0 1.0.0