Ngrok 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.
Before using ngrok, when we needed to expose a localhost application to web (internet) all we were doing is deploying the application in a server running a DMZ or we used to relocate the host to DMZ and configure NATing in the firewall. We also used to make DNS configuration in External DNS where the domain is hosted. In general, DMZ (De-Militarized Zone) is a computer host or small network inserted as a “neutral zone” between a company’s private network and the outside public network. It prevents outside users from getting direct access to a server that has company data. The following are the issues that we were facing before Ngrok deployment:
- Unable to expose localhost application directly to internet without DMZ & other network configuration
- Unable to demonstrate an application to Client on urgent basis
- Unable to share websites for testing purpose
- Develop any services which consume Webhooks (HTTP CallBacks)
- Can’t share a website temporarily that is running only on our developer machine
- Time Consuming on network and DNS configurations
- Can’t debug or inspect HTTP Traffic in a precise manner
- Can’t run networked services on machines that are firewalled off from the internet
- Unable to expose application behind http proxy
- Unable to forward non-http and non-local network services
Architecture before Ngrok deployment
Using Ngrok, we can addressed all the about requirements and mainly it serves our business need in faster, secure and easy manner.
As this is a small 9MB executable(.exe) tool which can be downloaded from here. we can be generally executed with Ngrok command followed by the port no which has to be exposed as follows,
Which gives a random subdomain on Ngrok.com and it’ll be accessible over both HTTP and HTTPS (Secure).
Now anyone can access the application running locally on your machine from anywhere in the world using the forward URLs providing by the ngrok tool.
Architecture after Ngrok deployment
All in all, this is an amazing, secure and powerful tool that helps to meet our business needs on right time.