Get your free beta license ↗
API operation · security group
POST

/security/bans/allow

First published 3 Oct 20260.1.0Unchanged since publication

Add IP addresses from matching bans to the Allow list

Who may call it
AdministratorResellerCustomer
Token scope, any of
securityall
Answers200 OK

UrbeStack adds each matching IP address individually and lifts all active bans for that IP address, including bans outside the filters. Active, expired, and unblocked bans can match within the 30-day retention period. The Allow list takes precedence over the Deny list and exempts these IP addresses from future bans and fail2ban's attempt counts.

Supply at least one nonempty filter among address, jail, service, q, since, and until. The fields use the formats documented by GET /security/bans. A CIDR network in q takes precedence over a CIDR network in the address field. The API returns 400 if no filter is supplied or if jail, service, q, since, or until is invalid.

As a command

Run as root on the server

Request body

JSON ·BanFilter· 6 fields
addressstring, up to 64 characters
IP address or network in CIDR notation. Matches bans for the specified IP address or for IP addresses within the network.
jailstring, matching ^[a-z0-9][a-z0-9-]{0,31}$
Name of the rule that issued the ban.
qstring, up to 200 characters
IP address, network, or text from the log line that triggered the ban.
servicestring, one of ssh, panel, mail, webmail, phpmyadmin, ftp, sites, repeat, own
Service protected by the rule.
sincestring, matching ^\d{4}-\d\d-\d\d(?:[T ]\d\d:\d\d(?::\d\d)?)?Z?$
Inclusive start of the ban time range, given as a UTC date or date and time.
untilstring, matching ^\d{4}-\d\d-\d\d(?:[T ]\d\d:\d\d(?::\d\d)?)?Z?$
Inclusive end of the ban time range, given as a UTC date or date and time. A date alone includes the entire day.

Example

See the API overview for how to set $API and $TOKEN.
Request
curl -sS -X POST "$API/security/bans/allow" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "info@example.com",
    "jail": "text",
    "q": "text",
    "service": "ssh",
    "since": "text",
    "until": "text"
  }'
Response · 200 OK
{
  "addresses": [
    "text"
  ],
  "allowed": [
    "text"
  ],
  "fail2ban": "text",
  "state": "text",
  "unblocked": 1
}

Errors

18 errors, each a status and a sentence
400'<n>' is a name fail2ban keeps for itself
400<what> is a date (2026-09-17) or a date and time (2026-09-17T14:02:00Z), UTC
400<what> is not a real date
400A rule name is 1 to 32 lowercase letters, digits and dashes
400A service is one of ssh, panel, mail, webmail, phpmyadmin, ftp, sites, repeat or own
400Invalid IPv4 address
400Invalid IPv6 address
400Invalid id
400Refused. <value>
400Refused. <value> is loopback: the server's own services talk to each other over it
400Say which bans: an address or network, a service or rule, a search, or a time window
400Say which bans: an address or network, a service or rule, a search, or a time window; or clear all blocks
400The search is up to 200 characters
401Authentication required
404Ban <id> not found
409<value> holds <dn.value>, which is on Deny: remove it there first
409<value> is on Allow as <al.value>: remove it there first
409A <kind> rule for <value> already exists
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/post-security-bans-allow/