Hacker News new | ask | show | jobs
by larrybolt 4391 days ago
No, localtunnel or ngrok will tunnel a local port (such as for instance 127.0.0.1:80) to a public domain name (alias.ngrok.com). This only redirects an alias to your ip address (alias.zzzz.io -> wan-ip-address).

The big difference is when you are inside your local network behind the router, or at work behind a firewall simple accessing the wan-ip won't reach your machine, unless you do port-forwarding (which isn't always straightforward or even possible.)

Ngrok solves this problem by being in the middle, both your machine and a person visiting alias.ngrok.com are connecting to ngrok, ngrok just passes the data along.

What this service however is good for is to have a dns address that always points to your local machine or your home network if your ISP doesn't provide you with a static ip (thus your ip changes every so often).

1 comments

Ah, OK. Thanks for the explanation. I wish there was some compromise where I could tunnel a local port in such a way that didn't require a server.
And I didn't even mention how some ISP's block ports below 1024 (thus ssh, ftp and web standard ports cannot be used to accept incoming connections even if you are connected to the WAN or did the port forwarding correctly).

That pretty much is (or was, not sure how most games currently handle networking) the main frustration of setting up a game server at home for your friends at their homes.

One solution back then was to use Hamachi to create a "virtual lan network". Btw for some use-cases you could even use "ssh -L <local port>:<remote computer>:<remote port> <user>@<remote ip>" with a server, and certainly nowadays you can get a vps at 12$/year (nothing fancy, but good enough for tunnelling ports).

Hamachi: https://en.wikipedia.org/wiki/Hamachi_(software)