Why would I want to open a tunnel through my firewall?

Suppose you have a service (HTTP, SSH, etc.) on a specific device (laptop, Raspberry Pi, etc.) behind a firewall that blocks outside access, and you need to share it with a device outside the network.

Go to NGROK [Link] and create an account.

Find the version for the system you want to share the service from, copy the link, and download NGROK on the host machine.

For Linux 64-bit:

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

For Raspberry Pi:

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

On the host device, extract the zip and add the ‘authtoken‘ from your account:

unzip ngrok*.zip
./ngrok authtoken 1nGTE96CoM7lXK8A0e7FNvg4NiD_6FCzSWB6fV9pgjAHQafoh

Run NGROK with the method and port of your service. Example for an HTTP server on localhost:

./ngrok http 80

A window will open showing the public address that tunnels traffic to the host device.

Copy and paste the generated address into a browser on any client to get access. The tunneled service stays available as long as NGROK is running. Press CTRL + C to stop it at any time.

To tunnel the SSH port:

./ngrok tcp 22

For help:

./ngrok help

BONUS

Try RusTunnel [Link], an open-source tunnel service written in Rust that replicates the core functionality of ngrok.


READ MORE

Setting Up a Cloudflare CDN [Link]