Reference Manual

NAME

upnpc - interact with an external UPnP Internet Gateway Device
SYNOPSIS
setuc [ifn | cname]                      # Host interface to use

upnpc -a ip port external_port tcp | udp # Add port mapping
upnpc -d external_port tcp | udp         # Delete port mapping
upnpc -e                                 # External IP address
upnpc -i                                 # Initialize device list
upnpc -s                                 # Status
upnpc -l                                 # List port mappings
upnpc -n ip                              # Get friendly name
upnpc -r port1 tcp | udp [...]           # Map these ports to the host interface

 

...
DESCRIPTION
The upnpc command sends control and status requests to external UPnP-enabled Internet Gateway Devices via the interface specified with command setuc (default is the current Windows "best" interface).

The upnpc command supports the following arguments:

-a   adds the specified port mapping to the device's Port Forwarding Table.

-d   removes the specified port mapping from the device's Port Forwarding Table.

-e   prints the device's current external IP address.

-i   prints the device's current external IP address.

-s   prints current status details of the device.

-l   prints current status details and mappings of the device.

-n   prints the friendly name of the specified device.

-r   maps the specified ports to the Windows IP address of the host interface.

NOTES

The UPnP Protocol does not allow port mappings other than those that were added via UPnP itself to be manipulated.

Some IGD's require that an administrator first enable full UPnP support before mappings can be added or deleted. Some even have all UPnP support disabled per default.

NAT32 UPnP support is based on code kindly supplied by Thomas Bernard's MiniUPNP Project. It does not require any UPnP or XML capabilities of the Operating System on which it runs. The code will therefore work correctly on all Windows and Windows-compatible platforms (e.g. ReactOS).

SEE ALSO
upnpd
doLoadResult('shell?cmd=upnpc+-i');