Today, I Learned...

by Justin Campbell

< All

Forward ports without touching your router with natman:

$ sudo npm install -g natman
$ sudo natman open ssh
info:    Creating NAT...
warn:    Using gateway: 10.0.1.1
help:    You can manually specify a gateway with -g argument
warn:    Attempting to connect...
info:    Connected to WAN address: 12.34.56.78
warn:    Mapping 12.34.56.78:8888 => localhost:22
info:    NAT established.
warn:    To stop forwarding, you may have to restart any exposed services
info:    Press CTRL-C to stop the NAT...

Also useful for sharing web pages with clients, or other devices:

$ rails server
$ sudo natman open 3000

Made with love by @marak

October 29th, 2012