Skip to content

Blocked IPs ​

Block addresses that attack the panel (brute force).

4 endpoints

GET /api/blocked-ips ​

Get Blocked

List blocked addresses, the failed-login attempts of the last 24 hours grouped by IP, the auto-block switch, its threshold and your own IP.

Sudo admin only

Response 200 Successful Response

Errors: 401 Unauthorized

bash
curl -X GET 'https://YOUR-PANEL/api/blocked-ips' \
  -H 'Authorization: Bearer $TOKEN'

POST /api/blocked-ips ​

Block

Block an IP address or CIDR range (ip, optional reason). You cannot block your own address or loopback. Blocked addresses get HTTP 403 on login and password change.

Sudo admin only

Request body application/json · BlockIn

FieldTypeRequiredDescription
ipstringyes
reasonstringno
json
{
  "ip": "string",
  "reason": ""
}

Response 200 Successful Response

Errors: 401 Unauthorized

bash
curl -X POST 'https://YOUR-PANEL/api/blocked-ips' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"ip": "string", "reason": ""}'

DELETE /api/blocked-ips ​

Unblock

Unblock an address (ip query parameter).

Sudo admin only

Parameters

NameInTypeRequiredDescription
ipquerystringyes

Response 200 Successful Response

Errors: 401 Unauthorized

bash
curl -X DELETE 'https://YOUR-PANEL/api/blocked-ips?ip=...' \
  -H 'Authorization: Bearer $TOKEN'

PUT /api/blocked-ips/auto ​

Auto

Turn automatic blocking on or off. When on, an IP that reaches the per-IP failed-login limit is blocked automatically.

Sudo admin only

Request body application/json · AutoIn

FieldTypeRequiredDescription
enabledbooleanyes
json
{
  "enabled": false
}

Response 200 Successful Response

Errors: 401 Unauthorized

bash
curl -X PUT 'https://YOUR-PANEL/api/blocked-ips/auto' \
  -H 'Authorization: Bearer $TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"enabled": false}'

Alexen v2.3.14 · 204 API endpoints