How to create tunnel to localhost using Ngrok

Ngrok – Secure Tunnel to localhost

Want to host your localhost server to the Internet ? Yes Ngrok is what you are looking for. With Ngrok you can create a secure tunnel to your localhost website.  Ngrok is the lightweight tool which creates a secure tunnel on your local machine along with a public URL so that it can be accessible over web. Ngrok will give you following features :

  • Demo without deploying
  • Simplify mobile device testing
  • Build webhook integrations with ease
  • lightweight alternative to VPN
  • Run personal cloud services from your own private networkNgrok a secure tunnel to localhost

In this article I will show you the steps to expose your localhost website which is deployed  on your machine local IIS.

  1. To create ngrok link you should have a dedicated website created in IIS.
  2. Download the ngrok exe file from here.
  3. After extracting the downloaded folder double click on the ngrok.exe file.
  4. It will open the command prompt for you, type command ngrok http 80 and hit enter. (This starts ngrok listening on port 8080 and creates the secure tunnel)
  5. You’ll see the http & https link belong to ngrok domain something like copy http link.
  6. In IIS add new binding for your site and paste the ngrok link as domain name.
  7. DON’T CLOSE!! Keep the ngrok command window open. if you close it then new domain name will be get generated next time.

Note:  As ngrok https not supported in basic version, so it has to work only with http. If your website using the https redirect rule then you have first disable it from your website config file.


2 thoughts on “How to create tunnel to localhost using Ngrok”

Leave a Comment

Your email address will not be published.