
Shut Down on Raspbian Stretch 2017.08.16 and newer versions can be accomplished using the shutdown overlay through the config.txt file of the boot partition. Schematic Raspberry Pi ENC28J60 schematic ENC28J60 Pinout ENC28J60 Module The current implementation was made using a Raspberry PI Zero, and an ENC28J60 Ethernet Module as follows: The configuration can be simplified by using a standard Raspberry PI (anyone with a built-in ethernet). There is no standard procedure for applying this settings so you will have to search how you make this changes on the specific model of the device and your internet provider.

On your internet provider’s device (modem/router) set port forwarding for redirecting from a specific external port (this port will be used at step 14) to port 22 of the device. Be able to understand if the Provider’s Modem/Router device has enabled any firewall rules which may conflict with your configuration.Access the Internet Provider’s Modem/Router at the Local Network and setup the appropriate port forwarding.Skip this step if you want the Drone to connect to your pc, but make sure that your computer is powered on when the Drone will try to initialize the connection. Configure an always on "Middle Host" with known external IP (must either be a static one, or have a way to know which is the one currently in use).In order to accomplish the following project and connect to the Drone you must: Access a remote network without knowing any details or making any configuration changes for monitoring, file exchange, etc.When the device power up, it will establish an ssh connection to a "MIDDLE_HOST" (an always online server with static IP) from where you can connect using SSH without the need to know the IP of the Drone. Just plug the Drone to the remote network using an Ethernet cable (the remote network must have DHCP enabled) and you are ready to go. Unless a firewall restricts SSH traffic, the following guide using a Raspberry PI and an ENC28J60 module should be enough to establish a connection to the remote network by plugging the device to the remote network through ethernet.Ī Remote Device, the "Drone", will initialize a reverse tunnel from "any" network with an active Internet connection back to your Local Network. We can use this method to establish a connection to a remote network without knowing it’s external IP or making any changes to the network’s configuration. Given that, this count of 6 rpi's can go upto 20 or 30 in future.Reverse SSH Tunneling is the connection from the destination to the source instead of the default procedure which is the connection from the source to the destination. Now I need to know if this the right approach to solve this use case.

But when I try to connect more devices, The tunnel doesn't seem to be connecting(i.e) Tunnel established from rpi, but nothing on netstat -lnpt on the cloud server. autossh -Nf -M 0 -o ServerAliveInterval=120 -o ServerAliveCountMax=3 -R 2101:127.0.0.1:22 works fine, for my 6 devices. I started a systemd to do this operation. Initially, I used direct SSH command's, but I ran into issues like, the connection becomes stale and unresponsive after a period of time. From my rpi reverse ssh to a specific port of my cloud serverĪnd from my local system connect to the rpi's using my cloud server as a jumpbox (SSH ProxyJump) Firewall.So I came up with a architecture shown below I have a use case where I have 6 of my raspberry pi sitting behind a private firewall and I need access to them from my local systems.
