Turn protection on or off
/services/{serviceId}/firewall/protectionUse this to switch Shield filtering for the server on or off.
- Token
- Bearer API token: cxk_live_ followed by 46 letters and digits
- Scope
firewall:write- Header
Authorization: Bearer $CLOUDUXE_API_KEY
How tokens and scopes work: Authentication and scopes.
serviceIdstring (uuid)RequiredThe service's id.
Clouduxe-VersionstringOptionalThe API version to use, such as 2026-12-01. Omit it to use your token's version.
pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$Idempotency-KeystringRequiredA unique key for this logical request, 1 to 128 characters of letters, digits, underscore, dot, colon or hyphen; a UUID is best. Retrying with the same key is safe: the change happens once and the retry gets the same answer. Keys are kept 48 hours.
pattern ^[A-Za-z0-9_.:-]{1,128}$
Body
RequiredenabledbooleanRequiredtrue to filter traffic, false to pass it unfiltered.
200OK The firewall.
objectstringRequiredThe object's type. Always "firewall".
serviceIdstring (uuid)RequiredThe service's id.
enabledbooleanRequiredWhether protection is on.
defaultPolicystringRequiredWhat happens to ports no enabled rule covers: allow or deny.
One ofallowdenyrulesarray of FirewallRuleRequiredThe inbound rules, at most 15.
max items 15Show 12 child attributesHide 12 child attributes
idstringRequiredThe rule's id: its protocol and first port, such as tcp-30120.
protocolstringRequiredtcp or udp.
One oftcpudpportStartintegerRequiredThe first port.
min 1, max 65535portEndintegerRequiredThe last port.
min 1, max 65535profilestringRequiredThe protection profile that inspects this traffic, such as fivem or generic.
pattern ^[A-Za-z0-9_-]{1,40}$enabledbooleanRequiredWhether the rule is on.
ppsLimitintegerRequiredPackets per second allowed to the whole port range; 0 means no extra limit.
min 0connectionPpsLimitintegerRequiredPackets per second allowed per established connection; 0 means no extra limit.
min 0newConnectionsPerSecondintegerRequiredNew connections per second allowed from one source address, 0 to 30; 0 means no extra limit.
min 0, max 30onlyProxiedbooleanRequiredAccept only traffic that arrives through Clouduxe's protected proxy.
blockUdpbooleanRequiredDrop UDP to this range.
protocolValidationbooleanRequiredCheck that traffic follows the profile's protocol, and drop what does not.
blockedIpsarray of BlockedIpRequiredBlocked source addresses.
Show 2 child attributesHide 2 child attributes
ipstringRequiredThe IPv4 address.
expiresAtstring (date-time) or nullRequiredWhen the block ends, or null for no end.
trustedIpsarray of TrustedIpRequiredTrusted source addresses.
Show 2 child attributesHide 2 child attributes
ipstringRequiredThe IPv4 address.
notestring or nullRequiredYour note.
updatedAtstring (date-time) or nullRequiredWhen this state was read.
Every response
- 200OKThe firewall.
- 400Bad requestThe request is not valid. Codes: version_invalid, idempotency_key_required, idempotency_key_invalid, invalid_json, parameter_missing, parameter_invalid, parameter_unknown.
- 401UnauthorizedAuthentication failed. Codes: token_missing, token_invalid, token_expired, token_revoked.
- 403ForbiddenThe token is not allowed to do this. Codes: forbidden, ip_not_allowed, api_access_disabled, scope_missing.
- 404Not foundNot found. Codes: not_found.
- 409ConflictThe request conflicts with the object's current state. Codes: firewall_not_available, idempotency_in_progress.
- 413Too largeThe request body is too large. Codes: request_too_large.
- 415Unsupported media typeUnsupported media type. Codes: unsupported_media_type.
- 422UnprocessableThe request is well formed but cannot be carried out. Codes: idempotency_mismatch.
- 423The service is locked. Codes: service_locked, service_unconfirmed, firewall_resetting.
- 429Too many requestsA rate limit was reached. Codes: rate_limited.
- 500Server errorUnexpected error. Codes: internal_error.
- 503UnavailableTemporarily unavailable. Codes: platform_unavailable, unavailable, outcome_unknown, limits_unavailable.