Skip to content

Instantly share code, notes, and snippets.

@junquera
Created November 9, 2018 17:54
Show Gist options
  • Save junquera/218aebf483ed3536d3914c1d2b7479d5 to your computer and use it in GitHub Desktop.
Save junquera/218aebf483ed3536d3914c1d2b7479d5 to your computer and use it in GitHub Desktop.
import miniupnpc
upnp = miniupnpc.UPnP()
upnp.discover()
upnp.selectigd()
port = 80
upnp.addportmapping(port, 'TCP', upnp.lanaddr, port, 'testing', '')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment