Ngrok (tunnel as a service)

> NetWork

1 - About

ngrok exposes local servers (usually a web server) behind NATs and firewalls to the public internet over secure tunnels.

Advertising

3 - Syntax

  • Authentication
ngrok http -auth="username:password" 8080
  • Choose a region
ngrok http -region eu 8080
  • Conf file
ngrok http -config=/opt/ngrok/conf/ngrok.yml 8000
# Start three named tunnels from the configuration file
ngrok start admin ssh metrics
ngrok start --all

4 - Admin UI

ngrok provides a real-time web UI where you can introspect all of the HTTP traffic running over your tunnels. After you've started ngrok, just open http://localhost:4040 in a web browser to inspect request details.

5 - Inspection

ngrok records:

  • each HTTP request
  • and response over your tunnels

for inspection and replay.

Disable Inspection

ngrok http -inspect=false 80
Advertising

5.1 - Replay

ngrok allows you to replay any request with a single click dramatically speeding up your iteration cycle. Click replay in the Admin UI