Live data from Hacker News

Ngrok: Secure tunnels to localhost

ngrok.com

91–100 of 195 posts

Re: Ngrok: Secure tunnels to localhost

#91
post #61

A lot of people seem to be a bit confused about the point of ngrok, why it's useful, how much it costs, etc. Let me try and help out. :) For me, the killer feature for ngrok is testing/developing webhooks. You install ngrok in your dev environment, start it up, then point the stripe/slack/whatever webhook your working on at the generated URL. ngrok will 1) proxy that request through to your dev environment 2) log the…

> Besides, what's your proposed alternative? Setup a proper development environment that mirrors the production environment?

That's staging, usually there is only one per project.

As a developer, ngrok makes it really easy to show-off your feature branch to customers/rest of the team, regardless of your location. And you're not dependent on having a CI deploying to per-branch environments.

Re: Ngrok: Secure tunnels to localhost

#93
post #73

Earlier quoted context omitted.

Surely you've heard of dynamic DNS?

Surely you've noticed this: > don't have a static IP that's internet-accessible I am one of those people :) I don't pay my ISP extra for a "real" IP address, so I have literally no way to receive incoming connections from the internet into my home network, it's all behind their NAT.

You don't need a static IP.

Re: Ngrok: Secure tunnels to localhost

#94

Earlier quoted context omitted.

If your users have to resort to this they are not getting the appropriate support they need. If your users are productive, chances are so is the company that pays both your salaries. If your users have to fight their infrastructure people to get their jobs done, you company will fail to effectively compete against those companies that don't. It astounds me that so few security people understand what their purpose is:…

Uh, no. The purpose of a security team is to prevent data from being exfiltrated from the company's control. Passwords, PII, HIPPA/other-compliance-controlled stuff, source code, etc. are all at risk of being stolen at all times, which means that security is a game of constant vigilance. And since everybody has at least a bit of this data under their control, this means that everybody is involved with security. (At l…

You're both right.

If the dev team needs something like ngrok, the security team has failed to provide proper tools.

If the dev team goes ahead and uses ngrok without consulting the security team, the dev team has likely committed an awful security breach.

The dev team and the security team need to think of each other as being on the same team, and talk to each every day about what they want and need.

Re: Ngrok: Secure tunnels to localhost

#95
post #70

Earlier quoted context omitted.

> Besides, what's your proposed alternative? Setup a proper development environment that mirrors the production environment?

Yes, I have that. How does that help me quickly iterate on getting proper handling for inbound webhooks from Stripe? Stripe wants a URL to send the payloads too, and my proper development environment is (not surprisingly) running inside a vagrant on my dev machine inside our office LAN. I could open up a port on our firewall and forward it through to my laptop but: 1) ngrok is easier 2) ngrok provides additional feat…

Or just maintain a $2.50 Vultr instance and on your dev box create a bash alias for a command that sets up a reverse ssh tunnel to it.

Then all you need to do is a one time setup of nginx on your Vultr (or DO or whatever) box to accept incoming webhook requests from e.g. stripe and proxy them down the ssh tunnel to your dev machine.

With the above in place, you'd literally hit one button on your keyboard to establish the tunnel and spawn whatever local process you want to receive the webhooks and... voila. It's secure, gives you logging and works from anywhere without needing any external port forwarding.

Re: Ngrok: Secure tunnels to localhost

#96

Nice tool, but without committing for annual billing (which I don't intend to do, not for the first year of usage) it's $10 a month. My internet connection, my mobile plan, my Photoshop & Lightroom subscription, a huge collection of music (Spotify), 3K~5K movies and TV shows (Netflix), etc., all cost approximately the same. I mean, sure, $120 a year is pocket change for somebody using Ngrok professionally, but that's…

Not sure it's fair for you to compare a small SaaS business to Netflix in terms of pricing. People have bills to pay.

I used the free plan for a while but having a reserved subdomain is pretty sweet. And the cost for a whole year of it is fairly small in my opinion.

Re: Ngrok: Secure tunnels to localhost

#97
post #12

Earlier quoted context omitted.

Do you mean: "why can't I set up port forwarding on my firewall, then create a DNS record for my domain that points to my current IP, then wait for that to propagate around the internet before I can use it, then do it all again when I move from e.g. office->home or my IP changes because of my ISP"? No reason.

Man you'll be floored when you'll learn about this thing called dynamic DNS, and even better it's been around for 20 years ? more ? Anyways my ISP has provided me with a fixed IP for about 17 years.

Man you'll be floored when you'll learn that 90% of people going online never have a "real IP". Servers see the IP of the NAT's most of the time. ngrok doesn't require an outside-accessible IP.

Re: Ngrok: Secure tunnels to localhost

#99
post #74

Earlier quoted context omitted.

I'd imagine that for this purpose a proper dev environment would well be isolated your "office LAN". ngrok can not possibly be easier than port forwarding.

> ngrok can not possibly be easier than port forwarding. Oh come on, of course it can. I use port forwarding myself, but ngrok literally makes testing remote webhooks as simple as running "ngrok". That's it. It's definitely what I recommend coworkers who just want a quick solution to test out 3rd party service integrations.

Um, just signing up for ngrok - 10 times more effort than port forwarding. Then you have to learn how to ngrok. And thats that's before actually figuring out what ngrok really is, how sensible it is to route data through a third party etc. etc. etc.

For people without public IPs - why not just learn how to setup an SSH tunnel instead? Similar effort, save it as a script. Boom, you actually learned something useful too.

Re: Ngrok: Secure tunnels to localhost

#100
post #88
post #65

Earlier quoted context omitted.

If you don't have a static IP that's internet-accessible, and that which you can arbitrarily point your domain to, how would you go about doing this? Some, if not most, services won't allow you to redirect cold to an IP address, they want some domain of sorts. There are alternatives, but I think "setup a proper dev environment" alone misses the point of what ngrok does. The 'easiest' alternative I've tried before was…

i tend to fire up reverse port forwarding with ssh + special subdomain + ask nginx to proxy to the reverse-forwarded port on that special subdomain to resolve this, obviously you'd still need a static and public ip somewhere, but any ssh-accessible host will now do. it's a bit of setup, but works quite well once set. does _not_ provide the features ngrok does of replay, etc, but at least it's 100% your own infrastruc…

I do exactly this. I also have it set up with let's encrypt so that the Webhooks are encrypted.

Locally, I also mirror the LE keys and add a hosts file entry for the test domain to localhost.

This means I can test locally with proper ssl certs.

Post reply on HN