How to install ngrok in termux


What is Ngrok?

Ngrok is a reverse proxy that creates a secure “tunnel” from a public endpoint for a web service running locally.
In other words, you can use Ngrok to expose a port on your system, for example, the port on which your application or website is running, to a public URL.
Basically, Ngrok creates a tunnel, where its function is to redirect external connections to your localhost.

How Ngrok works?

Let’s assume you have a web server running on your machine. Now you intend to share, with a colleague, the address of a website that you developed, but as it is on the private network. To do this, just use Ngrok. Considering that the webserver is at port 8080, you only need to execute the following command:

ngrok http  8080

What is the use of Ngrok?

  • Share website to a colleague that is running on a private network;
  • Create a TCP server on your device;
  • Port forwarding;
  • Testing mobile apps connected to your locally running backend;
  • Stable addresses for your connected devices that are deployed in the field;
  • Running personal cloud services from your home;
  • You can also use Ngrok in ethical hacking.

You might be thinking about how to use Ngrok in Ethical hacking? Basically, you can take the reverse shell and reverse the connection of any device remotely through the TCP tunneling with Ngrok.Also Read:
How to install f-society in Termux

How to install Ngrok in Termux?

Here are the steps to install Ngrok in Termux. Please follow the steps one by one carefully to avoid any type of error. Please note that you must wait for each command to get completed.
1. First of all, open your Termux and then type the below command to update and upgrade your Termux repositories.

pkg update && pkg upgrade -y

2. Now type the below command. The below command will install zip and wget packages in your Termux. Here zip will be used to unzip the zipped folder of Ngrok while wget will be used to download the Ngrok.

pkg install zip wget -y

3. Now type the below command as it is to download Ngrok in your Termux.

wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip

Wait for downloading to be finished. It may take up to 2 to 5 minutes to download Ngrok depending upon your Internet speed.
4. Type the below command in your Termux to unzip the Ngrok folder.

unzip ngrok-stable-linux-arm.zip

5. After Unzipping, use the below command to give Ngrok permission to read, write, and execute.

chmod +x ngrok

6. Now open the Ngrok website by clicking the link below:
Open Ngrok Website
Now click on the Signup button, and then create a new account on Ngrok.
Now you need to confirm the Ngrok account. Open your email to confirm your Ngrok account. There you will see Ngrok email. Simply open that mail and click on the confirm account button.

7. Now login to Ngrok with your Email Id and Password and search for auth token on the Ngrok page. Then simply type the below command in your Termux And replace <YOUR_AUTH_TOKEN> with your auth token.

./ngrok authtoken YOUR_AUTH_TOKEN_HERE

Running the above command will add your auth token to your ngrok.yml file. Connecting an account will list your open tunnels in the dashboard, give you longer tunnel timeouts.
8. Hence Ngrok has been successfully installed in your Termux. Use the below command to see how to use Ngrok in Termux.

./ngrok help

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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