Skip to main content
POST
/
network
/
firewalls
/
{firewall_id}
/
rules
Create Firewall Rule
curl --request POST \
  --url https://api.cloud.onidel.com/network/firewalls/{firewall_id}/rules \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "protocol": "tcp",
  "subnet": "0.0.0.0",
  "subnet_size": "0",
  "team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "port": "443",
  "desc": "Allow HTTPS traffic"
}
'
{
  "firewall_rule": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "group": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "ip_type": "v4",
    "action": "allow",
    "protocol": "tcp",
    "port": "443",
    "subnet": "0.0.0.0",
    "subnet_size": "0",
    "desc": "Allow HTTPS"
  }
}

Authorizations

Authorization
string
header
required

Provide the value as: Token <your-api-token>

Path Parameters

firewall_id
string<uuid>
required

Firewall Group UUID

Body

application/json
protocol
enum<string>
required
Available options:
tcp,
udp,
icmp
Example:

"tcp"

subnet
string
required

IP/CIDR, special value (Cloudflare, Onidel, HetrixTools, CloudFront, UptimeRobot), or IP list (list:{uuid})

Example:

"0.0.0.0"

subnet_size
string
required

CIDR prefix length

Example:

"0"

team_id
string<uuid>
port
string

Port number or range (e.g. '80', '8000:9000'). Not required for ICMP.

Example:

"443"

desc
string
Example:

"Allow HTTPS traffic"

Response

Firewall rule created successfully

firewall_rule
object