Table Of Contents

Previous topic

NAT

Next topic

LCD

UPnP IGD

The UPnP IGD API allow you to control the settings of the Universal Plug n’ Play Internet Gateway Device service. This service allow hosts on your local network to manage nat redirections.

UPnP IGD Errors

When attempting to access the UPnP IGD API, you may encounter the following errors:

error_code Description
disabled the service is disabled
noent invalid rule id

UPnP IGD Config

UPnPIGDConfig has the following attributes:

UPnPIGDConfig
enabled bool

is the UPnP IGD service enabled

UPnP IGD config API

Get the current UPnP IGD configuration

GET /api/v3/upnpigd/config/

Get the UPnPIGDConfig

Example request:

GET /api/v3/upnpigd/config/ HTTP/1.1
Host: mafreebox.freebox.fr

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "success": true,
    "result": {
        "enabled": false
    }
}

Update the UPnP IGD configuration

PUT /api/v3/upnpigd/config/

Update the UPnPIGDConfig

Example request:

PUT /api/v3/upnpigd/config/ HTTP/1.1
Host: mafreebox.freebox.fr
{
   "enabled": true
}

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "success": true,
    "result": {
        "enabled": true
    }
}

UPnP IGD Redirection

UPnPRedir has the following attributes:

UPnPRedir
id string Read-only

the redirection id

enabled bool Read-only

is the redirection enabled

ext_src_ip string Read-only

source IP

ext_port int Read-only

external port

int_ip string Read-only

the target IP on your LAN

int_port int Read-only

the target port on your LAN

proto string Read-only

the IP protocol to redirect

desc string Read-only

a description

remaining int Read-only

seconds remaining before redirection expire

host LanHost Read-only

lan host if available

UPnP IGD Redirection API

Get the list of current redirection

GET /api/v3/upnpigd/redir/

Get the list of UPnPRedir redirections

Example request:

GET /api/v3/upnpigd/redir/ HTTP/1.1
Host: mafreebox.freebox.fr

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "success": true,
    "result": [
        {
            "enabled": true,
            "proto": "udp",
            "id": "0.0.0.0-53644-udp",
            "desc": "iC53644",
            "remaining": 0,
            "ext_src_ip": "0.0.0.0",
            "int_port": 16402,
            "int_ip": "192.168.1.44",
            "ext_port": 53644
        }
    ]
}

Delete a redirection

DELETE /api/v3/upnpigd/redir/{id}

Deletes the given UPnPRedir

Example request:

GET /api/v3/upnpigd/redir/0.0.0.0-53644-udp HTTP/1.1
Host: mafreebox.freebox.fr

Example response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
    "success": true
}