VPS

Update firewall rule

Update the firewall rule at pos. Empty fields clear that attribute on the rule.

put/v1/vps/{service_id}/firewall/rules/{pos}

Request

  • Base URL: https://developers.servera.co.uk
  • URL: https://developers.servera.co.uk/v1/vps/{service_id}/firewall/rules/{pos}
  • Auth: HTTP bearer

Path parameters

service_idinteger required

Service id of the VPS/VDS (from GET /vps) or Virtual Router (from GET /virtual-routers).

posinteger required

Firewall-rule position, 0-based (as returned by the firewall read).

Request body

type'in' | 'out' required
actionstring nullable

ACCEPT, DROP, REJECT, TARPIT or LOG (case-insensitive).

enableinteger nullable
sourcestring nullable

Source IP or CIDR (e.g. 1.2.3.4 or 10.0.0.0/8).

deststring nullable

Destination IP or CIDR.

protostring nullable

Protocol: tcp, udp, icmp, icmpv6, …

dportstring nullable

Destination port, range N-M, or comma list; each ≤65535.

sportstring nullable

Source port, range N-M, or comma list; each ≤65535.

commentstring nullable
ifacestring nullable
groupstring nullable

Example request

{
  "action": "ACCEPT",
  "comment": "HTTPS",
  "dport": "443",
  "proto": "tcp",
  "type": "in"
}

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 1 revision of this API.