CheckIP plugin helps manage and block IP addresses accessing the GP247 system.
- Manage IP lists with two types: allow and deny.
- Support wildcard
*:*in allow: allow all IPs.*in deny: deny all IPs (unless already allowed beforehand).
- Processing priority: allow > deny.
- Intuitive admin UI to create/update/delete.
- Field
status(ON/OFF) per record to quickly enable/disable (default ON when creating new).
- Class:
App\GP247\Plugins\CheckIP\Middleware\CheckIP - Flow (simplified):
- If IP matches allow list (or allow
*) or is localhost (127.0.0.1,::1) => allow. - Else, if IP matches deny list (or deny
*) => return 403. - Otherwise => allow.
- If IP matches allow list (or allow
Protection scopes: Admin, Front, API (all go through the CheckIP middleware).
flowchart LR
subgraph Contexts[Protection scopes]
A[Admin] --> M
B[Front] --> M
C[API] --> M
end
M[CheckIP Middleware] --> D1{Is IP localhost?<br/>127.0.0.1 or ::1}
D1 -- Yes --> ALLOW[Allow access]
D1 -- No --> D2{Matches Allow list<br/>or Allow *}
D2 -- Yes --> ALLOW
D2 -- No --> D3{Matches Deny list<br/>or Deny *}
D3 -- Yes --> DENY[403 Forbidden]
D3 -- No --> ALLOW
ALLOW --> NEXT[Proceed to route/controller]
DENY --> STOP[Stop request]
You can install using the following methods (similar to the plugin guide on GP247 Store):
- Copy the source code into the folder
app/GP247/Plugins/CheckIP. - Go to Admin > Plugins, find the CheckIP plugin to install and activate.
- Go to Admin > Plugins > tab "Install from file".
- Upload the plugin ZIP package and confirm installation.
- Go to Admin > Plugins > tab "Plugin Library".
- Find "CheckIP" and click Install.
- After installation, go to Admin > Security > CheckIP (menu name under SECURITY group) to manage.
- Create a record:
description: short description.ip: IP address (e.g.,203.0.113.10) or*.type: chooseallowordeny.status: ON to apply, OFF to temporarily disable.
- Note:
allowhas higher priority thandeny.
- Reference page (GP247 Store):
https://gp247.net/en/product/plugin-checkip.html - GitHub (source code):
https://github.com/gp247net/CheckIP
Plugin developed by GP247.