You can open port of router with miniupnp like this:
sh=new Shell
sh.Mode=0
' is on windows but is easy to port Mac/Linux
sh.Execute("upnpc-static.exe -a " +IP+ " " +InternalPort + " " +ExternarPort+ " " +Protocol)
If sh.errorCode <> 0 then
MsgBox "Print error: " + Str(sh.errorCode)
end if
sh.Close
where:
IP: is internal IPv4 address
InternalPort: is port associated to internal IP
ExternarPort: is the external port
Protocol: is TCP or UDP
NOT ALL routers are working with miniupnp, and does not work if you have more than one router.
If you want add UPnP server support to your app, write declares for miniupnp libraries or i can write a rs/xojo plugin, anyone interested?