Firewall

Update Server Firewall Groups

put/firewall/{server_type}/{server_id}/groups

Replace all firewall groups assigned to a VPS or baremetal server.

The new rules are applied in the background. On a VPS both inbound and outbound rules apply. On a baremetal server they are enforced on its switch ports: only inbound rules apply, replies to connections the server opens are allowed for TCP and for UDP from ports 53 and 123, and ICMP is always allowed. An empty list disables the firewall.

Authorization

Authorization
Authorization*string

Bearer YOUR_API_TOKEN with an API token. The X-API-Key: YOUR_API_TOKEN header works too.

Path parameters

server_type*FirewallServerType
Value in"vps""baremetal"
server_id*integer
Range1 ≤ value

Request body

Update the firewall group assignments of a VPS or baremetal server

application/jsonRequired
firewall_group_ids*array<integer>

Responses

Successful Response

application/json

detail*string
server_type*string
server_id*integer
vps_id?integer | null
baremetal_id?integer | null
firewall_groups*array<integer>
sync_task_created*boolean