Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

GET /cgi-bin/luci/sdewan/mwan3/v1/policypolicies/{policy-name}

Get a policy

Request: N/A

  • Request Parameters

    NameInTypeDescription
    policy-namepathstringpolicy name


Response

...

POST /cgi-bin/luci/sdewan/mwan3/v1/policypolicies

create a new policy

Request:

...

PUT /cgi-bin/luci/sdewan/mwan3/v1/policypolicies/{policy-name}

update a policy

Request:

  • Request Parameters:

    NameInTypeDescription
    policy-namepathstringpolicy name
    membersbodyarraypolicy members
    interfacebodystringmember interface name
    metricbodyint(optional) default: 1, members within one policy with a lower metric have precedence over higher metric members
    weightbodyint(optional) default: 1, members with same metric will distribute load based on this weight value


  • Request Example


    {

           "members": [

               {

                   "interface": "net1",

                   "metric" 1,

                   "weight": 2

                }

                {

                    "interface": "net2",

                    "metric" 1,

                     "weight": 1

                }

           ]

    }


...

DELETE /cgi-bin/luci/sdewan/mwan3/v1/policypolicies/{policy-name}

delete a policy

Request:

  • Request Parameters

    NameInTypeDescription
    policy-namepathstringpolicy name


Response

...

GET /cgi-bin/luci/sdewan/mwan3/v1/rulerules/{rule-name}

Get a rule

Request: N/A

  • Request Parameters

    NameInTypeDescription
    rule-namepathstringrule name


Response

...

POST /cgi-bin/luci/sdewan/mwan3/v1/rulerules

create a new rule

Request:

...

PUT /cgi-bin/luci/sdewan/mwan3/v1/rulerules/{rule-name}

update a policy

Request:

  • Request Parameters

    NameInTypeDescription
    rule-namepathstringrule name
    policybodystringpolicy used for the rule
    src_ipbodystring(optional) source ip address
    src_portbodystring(optional) source port or port range
    dest_ipbodystring(optional) destination ip address
    dest_portbodystring(optional) destination port or port range
    protobody string (optional) protocol for the rule. Valid values: "tcp", "udp", "icmp", "all"
    familybody string (optional) address family. Valid values: "ipv4", "ipv6", "all" 
    stickybody string (optional) default: 0, allow traffic from the same source ip address within the timeout limit to use same wan interface as prior session 
    timeoutbody int (optional) default: 600,  Stickiness timeout value in seconds


  • Request Example


    {

        "dest_ip": "0.0.0.0/0",

         "policy": "balanced"

    }


...

DELETE /cgi-bin/luci/sdewan/mwan3/v1/rulerules/{rule-name}

delete a rule

Request:

  • Request Parameters

    NameInTypeDescription
    rule-namepathstringrule name


Response

...

GET /cgi-bin/luci/sdewan/firewall/v1/zonezones/{zone-name}

Get a zone

Request: N/A

  • Request Parameters

    NameInTypeDescription
    zone-namepathstringzone name


Response

...

POST /cgi-bin/luci/sdewan/firewall/v1/zonezones

create a new zone

Request:

...

PUT /cgi-bin/luci/sdewan/firewall/v1/zonezones/{zone-name}

update a zone

Request:

  • Request Parameters:

    NameInTypeDescription
    zone-namepathstringzone name
    {other params}body
    same with GET response


  • Request Example


    {

           "network":"wan",

           "input": "REJECT",

           "output": "ACCEPT",

          "forward": "REJECT",

           "masq": "1",

           "mtu_fix": "1"

    }


...

DELETE /cgi-bin/luci/sdewan/firewall/v1/zonezones/{zone-name}

delete a zone

Request:

  • Request Parameters

    NameInTypeDescription
    zone-namepathstringzone name


Response

...

GET /cgi-bin/luci/sdewan/firewall/v1/redirectredirects/{redirect-name}

Get a redirect

Request: N/A

  • Request Parameters

    NameInTypeDescription
    redirect-namepathstringredirect name


Response

...

POST /cgi-bin/luci/sdewan/firewall/v1/redirectredirects

create a new redirect

Request:

...

PUT /cgi-bin/luci/sdewan/firewall/v1/redirectredirects/{redirect-name}

update a redirect

Request:

  • Request Parameters:

    NameInTypeDescription
    redirect-namepathstringredirect name
    {other params}body
    same with GET response


  • Request Example


    {

        "src":"wan",
        "src_dport":"19900",
        "dest":"lan",
        "dest_ip":"192.168.1.1",
        "dest_port":"22",
        "proto":"tcp",
        "target":"DNAT"

    }


...

DELETE /cgi-bin/luci/sdewan/firewall/v1/redirectredirects/{redirect-name}

delete a redirect rule

Request:

  • Request Parameters

    NameInTypeDescription
    redirect-namepathstringredirect name


Response

...

GET /cgi-bin/luci/sdewan/firewall/v1/rulerules/{rule-name}

Get a rule

Request: N/A

  • Request Parameters

    NameInTypeDescription
    rule-namepathstringrule name


Response

...

POST /cgi-bin/luci/sdewan/firewall/v1/rulerules

create a new rule

Request:

...

PUT /cgi-bin/luci/sdewan/firewall/v1/rulerules/{rule-name}

update a rule

Request:

  • Request Parameters:

    NameInTypeDescription
    rule-namepathstringrule name
    {other params}body
    same with GET response


  • Request Example


    {

           "src":"lan",

           "src_ip": "192.168.1.2",

           "src_port": "80",

           "proto":"tcp",

           "target":"REJECT"

    }


...

DELETE /cgi-bin/luci/sdewan/firewall/v1/rulerules/{rule-name}

delete a firewall rule

Request:

  • Request Parameters

    NameInTypeDescription
    rule-namepathstringrule name


Response

...

GET /cgi-bin/luci/sdewan/firewall/v1/forwardingforwardings/{forwarding-name}

Get a forwarding

Request: N/A

  • Request Parameters

    NameInTypeDescription
    forwarding-namepathstringforwarding name


...

POST /cgi-bin/luci/sdewan/firewall/v1/forwardingforwardings

create a new forwarding

Request:

...

PUT /cgi-bin/luci/sdewan/firewall/v1/forwardingforwardings/{forwarding-name}

update a forwarding

Request:

  • Request Parameters:

    NameInTypeDescription
    forwarding-namepathstringforwarding name
    {other params}body
    same with GET response


  • Request Example


    {

           "src":"lan",

           "dest": "wan"

    }


...

DELETE /cgi-bin/luci/sdewan/firewall/v1/forwardingforwardings/{forwarding-name}

delete a forwarding rule

...

  • Request Parameters

    NameInTypeDescription
    forwarding-namepathstringforwarding name


...