=== TrustBrain IP Access Control ===
Contributors: iwamura
Tags: security, country-block, geolocation, firewall, access-control
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

GeoIP-based access control plugin with country blocking, IP whitelist/blacklist, and access logging.

== Description ==

TrustBrain IP Access Control is a security plugin for WordPress that provides comprehensive IP-based access control:

= Access Control Features =
* Country-based access control (whitelist/blacklist)
* IP address and CIDR whitelist/blacklist
* ASN (Autonomous System Number) based blocking
* Separate settings for backend (admin area) and frontend
* XML-RPC and REST API protection
* Comment and trackback spam protection
* Access logging and statistics
* Emergency access URL for lockout recovery

= GeoIP Integration =
This plugin uses MaxMind GeoLite2 databases for IP geolocation. You need to obtain a free license key from [MaxMind](https://www.maxmind.com/en/geolite2/signup) to use the geolocation features.

== Installation ==

1. Upload the `trustbrain-ip-access-control` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to 'IP Access Control' in the admin menu to configure settings
4. Obtain a MaxMind license key and configure it in the maintenance settings

== Frequently Asked Questions ==

= Do I need a MaxMind license key? =

Yes, to use the country-based blocking features, you need a free MaxMind GeoLite2 license key. You can sign up at https://www.maxmind.com/en/geolite2/signup

= Will this plugin slow down my site? =

The plugin is optimized for performance. IP lookups use local database files with caching, ensuring minimal impact on page load times.

= Can I block specific countries from accessing my admin area? =

Yes, you can set up country-based whitelist rules for the backend (admin area) and whitelist or blacklist rules for the frontend.

= What if I accidentally lock myself out? =

The plugin provides an Emergency Access URL feature that allows you to bypass IP restrictions temporarily.

== Screenshots ==

1. Block statistics dashboard: visualizes total blocks, cache hit rate, and average processing time over the last 30 days.
2. Backend (admin area) access control: country code whitelist, IP restriction (with ASN support), XML-RPC / REST API protection, and emergency access URL.
3. Frontend (public pages) access control: country whitelist, denied IP list, and protection targets (comment, trackback, oEmbed, REST API).

== Changelog ==

= 1.0.0 =
* Initial release
* Country-based IP blocking (whitelist/blacklist)
* IP address, CIDR, and ASN blocking
* Backend and frontend protection settings
* XML-RPC and REST API protection
* Access logging and statistics
* Emergency access URL feature

== Upgrade Notice ==

= 1.0.0 =
Initial release.

== Privacy Policy ==

This plugin stores access logs including IP addresses for security purposes. The logs are stored locally in your WordPress database and can be configured to auto-delete after a specified retention period.

This plugin uses MaxMind GeoLite2 databases for IP geolocation. The databases are stored locally and no IP data is sent to external services during normal operation.

== Third-Party Services ==

This plugin optionally connects to MaxMind servers to download GeoLite2 database updates. This only occurs when you manually trigger an update or enable automatic updates. No visitor data is transmitted.

* MaxMind GeoLite2: https://www.maxmind.com/en/geolite2/eula
* Privacy Policy: https://www.maxmind.com/en/privacy-policy
