Using Curl to Add a Firewall Filter Rule

Example: Using Curl to add a firewall filter rule

curl -k -X POST -H "Content-Type: application/json" -d '{
    "action" : "ACCEPT",
    "description" : "",
    "direction" : "INGRESS",
    "dstIp" : "192.168.2.103",
    "dstMask" : 32,
    "dstNetwork" : "",
    "dstPortEnd" : 21,
    "dstPortStart" : 20,
    "enabled": true,
    "name": "FTP-SERVER",
    "protocol" : "TCP",
    "srcIp" : "ANY",
    "srcMask" : 32,
    "srcMac" : "",
    "srcNetwork" : "",
    "srcPortEnd" : "ANY",
    "srcPortStart" : "ANY"
}' https://192.168.2.1/api/filters?token=2442CB0CB60B2EE9F5A35DF5ED8C33

Example: Curl result:

{
    "code" : 200,
    "status" : "success"
}