Skip to content

Create a new firewall rule

POST
/rules

Creates a new firewall rule with the provided details.

Request Body required

object
id
integer
destination
required
string
45.90.13.24/32
action
required
string
Allowed values: permit deny
permit
note
string
Example Rule
protocol
required
integer
6
source
string
8.8.8.8/32
order
required
integer
<= 10000
18
destination_port
object
match_type
string
Allowed values: eq gt lt neq range
match_value
Array<integer>
range
object
start
integer
<= 65535
end
integer
<= 65535
source_port
object
match_type
string
Allowed values: eq gt lt neq range
match_value
Array<integer>
range
object
start
integer
<= 65535
end
integer
<= 65535
matches
Array<object>
object
match
required
string
Allowed values: ack fin psh rst syn urg dscp ecn proto fragments ttl
match_type
string
Allowed values: eq gt lt neq range
match_value
string
range
object
start
integer
<= 65535
end
integer
<= 65535

Responses

200

Successful creation of firewall rule

object
data
object
rule_id
integer
12243
success
boolean
true

400

Bad request (e.g., invalid input)

object
success
boolean
message
string