firewall-ruleset

Create server firewall rule

Creates a new server firewall rule.

post/1.3/firewall-ruleset/server/{server-uuid}/firewall-rule

Request

  • Base URL: https://api.upcloud.com
  • URL: https://api.upcloud.com/1.3/firewall-ruleset/server/{server-uuid}/firewall-rule
  • Auth: HTTP bearer

Path parameters

server-uuidstring uuid required

The unique identifier for the server.

Example:01234567-89ab-cdef-0123-456789abcdef

Server UUID

Request body

Example request

{
  "firewall_rule": {
    "position": "1",
    "direction": "in",
    "family": "IPv4",
    "protocol": "tcp",
    "source_address_start": "192.168.1.1",
    "source_address_end": "192.168.1.255",
    "source_port_end": "",
    "source_port_start": "",
    "destination_address_start": "",
    "destination_address_end": "",
    "destination_port_start": "22",
    "destination_port_end": "22",
    "icmp_type": "",
    "action": "accept",
    "comment": "Allow SSH from this network"
  }
}

Response

Created

Example response

{
  "firewall_rule": {
    "direction": "in",
    "action": "accept",
    "family": "IPv4",
    "protocol": "tcp"
  }
}

Changes

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