How to Install & Use Ngrok

Posted by

Ngrok is a powerful tool that allows you to expose your local server to the internet using secure tunnels. It’s commonly used for web development, testing, and accessing local services remotely. Here’s a brief tutorial on how to install and use Ngrok on Kali Linux:

Step 1: Download Ngrok

  1. Open your web browser and go to the official Ngrok website: https://ngrok.com/download.
  2. Download the Linux version of Ngrok that matches your Kali Linux architecture (32-bit or 64-bit). It will be a zip file.

Step 2: Extract the Ngrok Package

  1. Open the Terminal in Kali Linux.
  2. Navigate to the directory where you downloaded the Ngrok zip file. Use the cd command to change directories, for example:
cd ~/Downloads

Unzip the Ngrok package using the unzip command:

unzip ngrok.zip

Step 3: Authenticate Ngrok

  1. In order to use Ngrok, you need to sign up for a free account at https://ngrok.com/signup.
  2. After signing up, you’ll receive an authentication token in your email. Copy this token as you’ll need it to authenticate Ngrok.

Step 4: Configure Ngrok with Authentication Token

  1. In the Terminal, navigate to the directory where you extracted Ngrok in Step 2.
  2. Authenticate Ngrok with your token using the following command (replace your_auth_token with your actual token):
./ngrok authtoken your_auth_token

Step 5: Start a Tunnel

  1. To start a new tunnel for your local server, use the following command:
./ngrok http 80
  1. This example assumes that your local server is running on port 80. Change the port number if your server runs on a different port.
  2. Ngrok will generate a public URL (e.g., https://randomstring.ngrok.io) that you can share with others to access your local server.

Step 6: Using Ngrok with Other Protocols

  • If your local server uses HTTPS or other protocols, you can use Ngrok accordingly. For example, for an HTTPS server running on port 443, use:
./ngrok https 443

Step 7: Closing the Tunnel

When you’re done using Ngrok, simply close the Terminal or press Ctrl + C to terminate the active tunnel.

Remember that Ngrok URLs are temporary and tied to your Ngrok account. Free accounts have limitations on usage, such as a limited number of connections and public URLs. Consider checking Ngrok’s pricing plans if you need more resources and features for your projects.

With this tutorial, you should now be able to install and use Ngrok on Kali Linux effectively. Enjoy exploring the possibilities of exposing your local services to the internet securely!

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.