Skip to main content
POST
Create firewall rule

Authorizations

Authorization
string
header
required

Path Parameters

server
string
required

Body

application/json
action
enum<string>
required

Rule action

Available options:
ACCEPT,
DROP,
REJECT
type
enum<string>
required

Traffic direction

Available options:
in,
out
proto
string

Protocol (tcp, udp, icmp, etc.). Required when dport or sport is set.

dport
string

Destination ports, separated by commas: ports from 1 to 65535, from:to ranges and service names such as https. At most 15 ports, with a range counting as two. Leave it empty to match every port; * is refused. Requires proto.

Spaces between entries and - in ranges are accepted and normalised: 80, 443 is stored as 80,443 and 1000-2000 as 1000:2000. Any other list returns a 422.

Maximum string length: 255
sport
string

Source ports, in the same format as dport. Requires proto.

Maximum string length: 255
source
string

Source IP/CIDR

dest
string

Destination IP/CIDR

comment
string

Rule comment

Maximum string length: 255
enable
boolean

Whether rule is enabled

Response

Firewall rule created successfully.

status
boolean
message
string