As you can read above, the script is downloaded and then permission is set accordingly. Noticed that UPnP is found on my router on port 42917. Then you can instruct the router to port forward, in this example port 1337 to an internal of this machine. In this example, my local ip is 192.168.133.1 and the application is running on port 9999. Now, to simulate this work, you can use command nc to listen on port 9999.

To test if this work, just get your public ip and telnet to your router on port 1337, your router should forward this traffic to internal machine 92.168.133.20 port 9999. As you can also see above, when telnet is done, nc port listen is also closed. That's it. Have fun port forwarding!