Personal utility (actually just a command) that I use to reach my Raspberry Pi Nodes that has no direct route via the Internet
Other Projects
There’s a lot of other tools out there that’s already solving this issue, such as inlets, but I wanted my own, so that I can extend features to it as it pleases me.
Overview
This is more ore less how it looks like:
1 2 3 4 5 6 7 |
|
- SSH Tunnel is setup from the Raspberry Pi Nodes
- Each Raspberry Pi sets up a unique port on the VPS for the tunnel to traverse to the Rpi on port 22
- To reach Rpi-01, you hop onto the VPS and ssh to localhost port 2201
- To reach Rpi-02, you hop onto the VPS and ssh to localhost port 2202, etc
Progress
The tool will still be built, but using ssh it’s quite easy
Usage
Setup the SSH Reverse Tunnel from rpi-01:
1 2 3 4 5 6 |
|
Setup the SSH Reverse Tunnel from rpi-02:
1 2 3 4 5 6 |
|
On the VPS, we can see that we have port 2021 and 2022 listening:
1 2 3 4 5 |
|
To connect to rpi-01, we ssh to localhost on port 2201, from the VPS:
1 2 |
|
To connect to rpi-02, we ssh to localhost on port 2202 from the VPS:
1 2 |
|