linux
We can use ssh reverse tunnel as an approach to access our local device under the localnet work behind the firewall or NAT.
Please check the detail from Video tutorial
ssh -N -R localhost:1234:localhost:22 -i </path/to/ssh/private/key> ubuntu@<cloud.vm.ip.address>
# /etc/systemd/system/<service.name>.service
[Unit]
Description=Setup a secure tunnel to ubuntu pi
After=network.target
[Service]
ExecStart=/usr/bin/ssh -N -R localhost:1234:localhost:22 -i </path/to/ssh/private/key> -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes ubuntu@<cloud.vm.ip.address>
RestartSec=15
Restart=always
[Install]
WantedBy=multi-user.target