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.

link|improve this question

49% accept rate
what exactly are you attempting to do? UPNP is something that should be on an internal network, so there shouldn't be any reason for port forwarding since there is no firewall. What device will the mac connect to with upnp and what is your LAN setup like? – MaQleod Sep 24 '10 at 0:42
@MaQleod, UPnP can be used for setting up a lot of different network devices. A popular category of UPnP-capable devices are home gateway routers, which the UPnP spec calls "Internet Gateway Devices" (IGDs). UPnP's IGD protocols can be used to registering NAT port mappings. – Spiff Sep 24 '10 at 4:31
feedback

2 Answers

up vote 1 down vote accepted

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
link|improve this answer
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.