POST
/
firewall
/
rule
cURL
curl --request POST \
  --url https://api.ck-itsolutions.nl/v1/firewall/rule \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "descr": "<string>",
  "dst": "<string>",
  "src": {
    "start": "<string>",
    "end": "<string>"
  },
  "port": {
    "src": {
      "start": 123,
      "end": 123
    },
    "dst": {
      "start": 123,
      "end": 123
    }
  },
  "protocol": "<string>",
  "action": "<string>",
  "priority": 123,
  "disabled": true,
  "tcpflags": [
    "<any>"
  ],
  "ratelimit": 123,
  "packetlength": 123,
  "packettype": 123,
  "statetype": "<string>"
}'
{}

Authorizations

x-api-key
string
header
required

Body

application/json

Plant to add to the store

dst
string
required

Destination IP the firewall rule needs to be created for (subnets supported).

protocol
string
required

Internet Protocol version this rule applies to. Allowed options: any, ip, hopopt, icmp, igmp, ggp, ipencap, st, tcp, egp, igp, pup, udp, hmp, xns-idp, rdp, iso-tp4, dccp, xtp, ddp, idpr-cmtp, ipv6, ipv6-route, ipv6-frag, idrp, rsvp, gre, esp, ah, skip, ipv6-icmp, ipv6-nonxt, ipv6-opts, rspf, vmtp, eigrp, ospf, ax.25, ipip, etherip, encap, pim, ipcomp, vrrp, l2tp, isis, sctp, fc, mobility-header, udplite, mpls-in-ip, manet, hip, shim6, wesp, rohc, ethernet, mptcp

action
string
required

Allowed options: accept, continue, drop and reject

priority
integer
required

Rule priority with 1 being highest priority.

descr
string

Description of the firewall rule.

src
object

Source IP the firewall rule needs to match.

port
object
disabled
boolean

Enable or disable the firewall rule.

tcpflags
any[]

TCP flags the rule must match to. Allowed options: fin, syn, rst, psh, ack, urg, ece, cwr

ratelimit
number

Ratelimit 0 - 4294967295.

packetlength
number

Packet length 1 - 65535.

packettype
integer

Allowed options: broadcast, host, multicast, other

statetype
string

Allowed options: established, invalid, new, related.

Response

Returns newly created firewall rule with uuid as json.

The response is of type object.