As I promised in my previous article, I’ll tell you how to install ngrok in termux. Here is the complete method of installing and setting up ngrok on termux. In this article, I’ll tell you about ngrok. You’ll learn what is ngrok, what is port forwarding, and how to use it. This is a short but important article. Because port forwarding is something you must know if you want to hack. So let’s get started.
What is Port Forwarding?
Port forwarding is used to allow external devices to access services on a private network. Well, the technical definition of port forwarding is a bit different. I used the simplest words to give you an idea. While performing hacking attacks on devices not on our network. Port forwarding is used. We need a static IP address for port forwarding.
What is ngrok?
Now if we don’t have a static IP. What should we do? Here comes ngrok. We use ngrok to forward ports. It is actually used to expose our localhost to the web. Using ngrok, you don’t need to open a port to your LAN.
How to install ngrok in termux?
There is no rocket science in installing ngrok. You just need to download the setup. Here is how to do it:
- Go to the ngrok download page here.
- Click on ‘Download for Linux’
- Now open your download directory in termux:
In my case, it’s sdcard/Downloads
So the command will be:
- Now type ‘ls’ and hit enter
- You’ll see a ‘ngrok-stable-linux-arm.zip’ file.
- Unzip the file to the termux.
- Now open the directory and move the ngrok file to the termux home directory. Use these commands.
mv -v ngrok /$HOME
- Now give permission to ngrok to install it. Use this command:
chmod +x ngrok
- Now simply install it using this command:
- You’re done.
How to configure ngrok?
Now we’re done with installation. It’s time to configure ngrok for port forwarding. Follow these steps:
- Go to the ngrok official site: https://ngrok.com/
- Click on ‘Get started for free’
- Sign up using email or Google account or GitHub account.
- Now you’re in the dashboard. Click on ‘Auth’
- And Copy the auth token. Or copy the command:
./ngrok authtoken [token]
- Now open your termux app, and paste the token and hit enter.
- You’re done.
- For help: Type command:
To get started, choose a port and hit enter. For example, I choose port 80:
ngrok http 80
So this was a short writeup on ngrok. I’ll see you in next writeup about another termux hacking tool. See you then.