Using Curl to Add a Firewall DNAT Rule

Example: Using Curl to add a firewall DNAT rule

curl -k -X POST -H "Content-Type : application/json" -d '{
    "description" : "",
    "direction" : "INGRESS",
    "enabled" : true,
    "guid" : "FTP-SERVER-DNAT",
    "name" : "FTP-SERVER",
    "protocol" : "TCP",
    "type" : "DNAT",
    "wanIp" : "ANY",
    "wanMask" : 32,
    "wanPortEnd" : "21",
    "wanPortStart" : "20",
}' https://192.168.2.1/api/nat?token=2442CB0CB60B2EE9F5A35DF5ED8C33

Example: Curl result:

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