Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
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
add comment

2 Answers

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

share|improve this answer
add comment
up vote 2 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
share|improve this answer
    
This client does not appear to have a Mac port directly available at the link provided. They only suggest going to MacPorts and trying to find one. –  James Mar 15 '13 at 6:29
    
Note that you can now install miniupnpc for UPNP or libnatpmp for NAT-PMP via Homebrew, depending on which your router supports. They give you the upnpc and natpmpc commands, respectively. –  tvon Mar 23 at 17:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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