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 network
In this article I will show you the steps to expose your localhost website which is deployed on your machine local IIS.
- To create ngrok link you should have a dedicated website created in IIS.
- Download the ngrok exe file from here.
- After extracting the downloaded folder double click on the ngrok.exe file.
- 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)
- You’ll see the http & https link belong to ngrok domain something like http://a231dcef.ngrok.io copy http link.
- In IIS add new binding for your site and paste the ngrok link as domain name.
- 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.