Ever need to give someone a URL to access a server running locally on your machine? Perhaps you had to forward ports or mess with some SSH reverse tunneling. Next time try ngrok!
There are a few ways to accomplish this, but ngrok is the most streamlined and feature packed way yet I’ve found to open up a local port to the world; perhaps for testing by a client or friend, or testing web hooks from services that can’t access your internal network.
Here’s how to get started:
You should see something like this:
And it’s capable of so much more:
ngrok -httpauth="helmet:12345" 80
Use specific subdomain
ngrok -subdomain=example 80
Forward to non-local services
Forward traffic other than HTTP
ngrok -proto tcp 22
Inspect and replay traffic
Run your own server!
Bonus: its written in go! So its fast and dependency free! Binaries are made available for Linux, Mac, and Windows.