Dave’s latest Windows Scripting Solutions article (link) demonstrates how a Perl script can use UPnP to query Internet Gateway Devices (IGD) to see what ports have been mapped.

It is unfortunate that UPnP support is haphazardly implemented on most vendor’s IGDs (such as broadband routers). This means that even the best written UPnP client code can only view the mapped ports that the IGD allows it to view. The promise of IGD falls quite short in this regard since not only are many of the features in the various DCPs optional but how they are implemented are up a vendor’s interpretation. Hopefully newer technologies such as Web Services on Devices (WSD) based on the Devices Profile for Web Services (DPWS) can change that.

To read this article requires a subscription to Windows Scripting Solutions.