Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Secure Tunnels to localhost using ngrok

Secure Tunnels to localhost using ngrok

ngrok is a free tool that allows you to expose a web server running on your local machine to the internet. It includes additional functionality that makes it easy to install and manage itself as a native operating system service on Windows, OS X and Linux.

It is is a multiplatform tunnelling, reverse proxy software that establishes secure tunnels from a public endpoint such as internet to a locally running network service while capturing all traffic for detailed inspection and replay.

The following are the issues that we were facing before Ngrok deployment:

  1. Unable to expose localhost application directly to internet without DMZ & other network configuration
  2. Unable to demonstrate an application to Client on urgent basis
  3. Unable to share websites for testing purpose
  4. Develop any services which consume Webhooks (HTTP CallBacks)
  5. Can’t share a website temporarily that is running only on our developer machine
  6. Time Consuming on network and DNS configurations
  7. Can’t debug or inspect HTTP Traffic in a precise manner
  8. Can’t run networked services on machines that are firewalled off from the internet
  9. Unable to expose application behind http proxy
  10. Unable to forward non-http and non-local network services

It’s really easy to install and use

ngrok is built in Go so it is packaged as binaries for each major platform. To install ngrok do the following:

  1. Download the package for your system
  2. Unzip the package
  3. There is no step 3!

Once you have ngrok installed, using it to tunnel to an application running on, say, port 3000 is as easy as:

[code]$ ./ngrok http 3000[/code]

Once you’ve unzipped the ngrok executable move it to a folder that’s in your $PATH then you can run ngrok from anywhere you want on the command line by just typing:

[code]$ ngrok http 3000[/code]

It has a dashboard
http://127.0.0.1:4040

You can secure your tunnels

[code]$ ngrok http -auth "user:password" 3000[/code]

You can use custom subdomains

[code]$ ngrok http -subdomain=thisisreallycool 3000[/code]

Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x