[ANN]: node-nat-pmp: A Node.js implementation of the NAT Port Mapping Protocol

521 views
Skip to first unread message

Nathan Rajlich

unread,
Aug 5, 2012, 6:39:49 PM8/5/12
to nodejs
If you've wanted to forward your ports programmatically before, and have a NAT-PMP compatible route (basically an Apple router), then this module is for you. You can get what the router believes is the external IP address, as well as open and close UDP and TCP ports to the computer sending the commands.

I recently ran into the need to forward a port on my home router without having access to the Airport Utility running at my home. This was the solution, to run a quick node script to open the SSH port for an hour while I did my thing. And no router configuration or rebooting was required, so it served my need perfectly. Hopefully you may enjoy it as well. Cheers!

Dan Milon

unread,
Aug 5, 2012, 7:38:38 PM8/5/12
to nod...@googlegroups.com
Unfortunately my router does not support it, but the module seems very neat.

Although, security-wise it doesn't seem very nice allowing any app to
open any ports. There should be some approval.
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

Marak Squires

unread,
Aug 5, 2012, 7:49:16 PM8/5/12
to nod...@googlegroups.com
Sweet.

--

Nathan Rajlich

unread,
Aug 5, 2012, 8:14:00 PM8/5/12
to nod...@googlegroups.com
Although, security-wise it doesn't seem very nice allowing any app to open any ports. There should be some approval.

You should check out the second paragraph of the "Security Considerations" section of the protocol. Apparently the authors have opposing opinions: http://tools.ietf.org/html/draft-cheshire-nat-pmp-03#section-5

Marak Squires

unread,
Aug 6, 2012, 9:22:15 AM8/6/12
to nod...@googlegroups.com
nananananananana Natman!


( CLI tool based on nat-pmp )

Thanks Nate!

On Sun, Aug 5, 2012 at 3:39 PM, Nathan Rajlich <nat...@tootallnate.net> wrote:

--
Reply all
Reply to author
Forward
0 new messages