Public URL for Localhost Without Changing Firewall Rules

NGRok – Access Local Web Applications From Internet Without Changing External Firewall Rules

Public URL for Localhost Without Changing Firewall Rules

Sometimes you are stuck to access a website due to the firewall settings between your webserver and internet because of no port forwarding in firewall or NAT to access websites running behind the firewall in local environment. You need to create a Public URL for Localhost Without Changing Firewall Rules. Ngrok is a great tool to access local servers behind firewalls over secure tunnels without opening the port in firewall.

How it works:

You are required to download a software on the machine where you deployed the websites e.g. IIS in case of windows environment and provide it the port of a network service mostly the web server. It connects to the ngrok cloud service which accepts traffic on a public address and relays that traffic through to the ngrok process running on your machine and then on to the local address you specified. You can inspect and check status in browser by using default URL: http://localhost:4040/inspect/http

Steps to follow:

  1. First you have to sign up for free account on https://ngrok.com and after you logged in to account, it will take you to download page with instructions. I am giving you example for Windows environment, if you want to run software in Linux then please follow steps mentioned on website beside download software section.
  2. Download the software for windows version in .zip format and extract it. Run the ngrok exe file and you will get below mentioned interface:

  1. Type ngrok.exe http 80 and hit enter. It will login and linked you with your created account. You can check in browser as well by using URL: http://localhost:4040/inspect/http. You can see in below mentioned screenshot that after run exe command it is showing online in command prompt and in browser as well.

  1. now if you have configured website in IIS it will automatically linked your website and provide a URL in browser under inspect section. Just click on Link and the website will be open. If you want to open a website with https setting, then select the https link. Below mentioned is the screenshot to understand:

  1. once you hit the http or https link, your website will be open in new tab of browser.

TIP:

When you open website URL in browser, it will take you in details of website. To go back to main page, just press the clear button and it will take you to the main page.