7

I'm looking for some no-brainer commandline tool or script that can be used to forward a given port from the LAN's router (which supports UPNP) to the local machine.

E.g.

upnpforward 9000

would forward port 9000 to from the router to the local host.

GJ.
  • 10,151

2 Answers2

7

Try the MiniUPNP client

Its usage is:

upnpc-static [options] -a ip port external_port protocol
        Add port redirection
upnpc-static [options] -d external_port protocol [port2 protocol2] [...]
        Delete port redirection
upnpc-static [options] -s
        Get Connection status
upnpc-static [options] -l
        List redirections
upnpc-static [options] -r port1 protocol1 [port2 protocol2] [...]
        Add all redirections to the current host
GJ.
  • 10,151
5

If a GUI tool is fine, or you don't mind creating that command line application yourself, have a look at Port Map / TCMPortMapper

0xZ3RR0
  • 103
Daniel Beck
  • 111,893