Expose local services securely over the internet using NGROK on Kali Linux
Step 1: Download NGROK
As of 2024, NGROK no longer uses the old Equinox URLs. Download the latest Linux binary from the official site:
wget https://bin.equinox.io/a/nmkK3DkqZEB/ngrok-v3-stable-linux-amd64.tgzOr visit https://ngrok.com/download and select "Linux (64-bit)".
Step 2: Install NGROK
Extract and install the binary:
tar -xvzf ngrok-v3-stable-linux-amd64.tgz
sudo mv ngrok /usr/local/bin/
ngrok --versionYou should see version info like ngrok version 3.x.x.
Step 3: Authenticate NGROK
1. Sign up at ngrok.com/signup
2. Go to your Auth Token page
3. Copy your token and run:
ngrok config add-authtoken YOUR_AUTH_TOKEN_HEREThis saves your token to ~/.config/ngrok/ngrok.yml.
Step 4: Start TCP Tunnel
Launch a local service (e.g., a web server on port 8080):
python3 -m http.server 8080In a new terminal, start NGROK in TCP mode:
ngrok tcp 8080NGROK will output a public endpoint like:
Forwarding tcp://0.tcp.ngrok.io:12345 -> localhost:8080Important Note
For HTTP/HTTPS services, use ngrok http 8080 instead—it provides cleaner URLs like https://abc123.ngrok.io. Use tcp only for non-HTTP protocols (SSH, Metasploit, custom apps).
Step 5: Access Remotely
Share the NGROK URL with anyone. They can connect using:
nc 0.tcp.ngrok.io 12345Or, if it's a web service (though not ideal over TCP), use:
curl http://0.tcp.ngrok.io:12345⚠️ Remember: TCP tunnels don’t support HTTP host headers—use ngrok http for websites.