Ngrok is an excellent online port forwarding tool. Using this tool you can host a page online and make it usable by anyone. And the special feature of this is that it is completely free.
In this post we will see how to install ngrok tool on termux without any error.
What is Ngrok?
ngrok is a cross-platform application that enables developers to expose a local development server to the Internet with minimal effort. The software makes your locally-hosted web server appear to be hosted on a subdomain of ngrok.com, meaning that no public IP or domain name on the local machine is needed.
In other word’s, Ngrok is a reverse proxy that creates a secure “tunnel” from a public endpoint for a web service running locally.
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 you can do with 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;
- And also you can use Ngrok in Ethical hacking.
How to install ingrok on termux
Installing this tool in termux is quite simple, but it requires the assistance of a tool, therefore we must first install the pre-installed tools necessary for this tool.
We need to install the two most important package required to run this tool.
This wget package is used to download a tool or a zip or rar file directly to termux. To install this tool on your termux run the following command.
pkg install wget
This unzip package is used to expand a zip file. Install the unzip tool with the below commands.
pkg install unzip
Now you need to go to the ngrok site and create an account for yourself then copy the ngrok download link in your account and type the following and paste it in your termux.
wget (your ngrok download link)
Now to unzip the downloaded ngrok zip file, type in your termux as shown below and press enter.
tar -xvzf (your ngrok zip file name)
Now you need to give the ngrok tool the necessary permission to run on your termux so type the following command
chmod +x ngrok
Now you have to login your ngrok account again in the browser and copy the authtoken for yourself and paste the termux.
ngrok installation is complete Now run the following command to execute ngrok on your termux.
./ngrok http 4444
That’s all done, that’s how you should install ngrok tool on your Termux. On some phones ngrok may not work properly then turn on the hotspot on your mobile and alternatively run your termux using the command given above.
I hope this post is very useful for you and if you have any doubts about this post you can ask me by command.