This article aims to be a comprehensive guide on installing and setting up ngrok tool in your system. In this article, I will show you a simple method using which you can enable port forwarding without a router using ngrok tool. So let’s get started.
ngrok is an open-source utility for exposing localhost ports to the Internet. It works by tunneling TCP/IP traffic over an encrypted HTTPS connection through its own encrypted proxy server. You can use it to securely expose any port number on your computer to the outside world without needing root privileges. ngrok allows you to expose a web server running on your local machine to the internet. Just tell ngrok what port your web server is listening on.
Easy to Install and Use
You’ll need to download the latest version of ngrok from their website. Once downloaded, extract the archive file using your favorite archiving tool (I recommend 7zip). Navigate to the folder where you extracted the archive and run the executable. Follow the prompts to complete the installation.
$ ngrok HTTP 80
When you start ngrok, it will display a UI in your terminal with the public URL of your tunnel and other status and metrics information about connections made over your tunnel.
After installing ngrok, navigate to the directory containing the ngrok binary. Open the configuration file at config.json in your preferred text editor. Edit the following settings:
- `http_port` – The port number you want to expose.
- `https_port` – The secure port number you want to use.
- `external_interface` – The IP address you want to bind to.
- `internal_ipv4` – The IPv4 address you want to bind ngrok to.
- `external` – Whether you want to allow external connections. If set to true, ngrok listens on all interfaces. If false, only listen on the specified interface.
- `auth_token` – An optional authentication token. If not provided, ngrok uses the default auth token.
Installing your Authtoken
$ ngrok authtoken <YOUR AUTHTOKEN>
Password protecting your tunnel
$ ngrok http -auth="username:password" 80
It has a dashboard
You can replay requests
So, this guide is about installing and configuring the ngrok tool. Now using the above steps you can enable the port forwarding on your local system without a router. Hope you like this cool trick, do share this trick with others too. Leave a comment below if you have any related queries about this.