Skip to main content

antihacks

Creates, updates, deletes, gets or lists an antihacks resource.

Overview​

Nameantihacks
TypeResource
Idovh.ip.antihacks

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
blocked_sincestring (date-time)The last blocking date (wire: blockedSince)
ip_blockedstring (ipv4)your IP (example: 192.0.2.0) (wire: ipBlocked)
logsstringLogs
statestringthis IP address state (blocked, unblocking)
timeintegerTime (in seconds) remaining before you can request your IP to be unblocked

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectip, ip_blockedGet a hack block. Returns the block date, logs, state, and the seconds left before you can ask to unblock.
listselectipstate, x_pagination_modeList hack blocks. Returns the addresses of the block blocked for outgoing attacks, filterable by state.
unblockexecip, ipBlockedLift a hack block. Unblocks the address once the waiting time is over. Get the hack block to see the seconds left.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
ipstring (ip-block)
ipBlockedstring (ipv4)your IP
ip_blockedstring (ipv4)your IP (wire: ipBlocked)
statestringFilter the value of state property (=)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get a hack block. Returns the block date, logs, state, and the seconds left before you can ask to unblock.

SELECT
blocked_since,
ip_blocked,
logs,
state,
time
FROM ovh.ip.antihacks
WHERE ip = '{{ ip }}' -- required
AND ip_blocked = '{{ ip_blocked }}' -- required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Lift a hack block. Unblocks the address once the waiting time is over. Get the hack block to see the seconds left.

EXEC ovh.ip.antihacks.unblock
@ip='{{ ip }}' --required,
@ipBlocked='{{ ipBlocked }}' --required
;