Autossh

Status
Not open for further replies.

Kain

Cadet
Joined
Mar 6, 2015
Messages
1
Hello,

I have FREENAS installed on mycomputer. My computer is connected to router. Router divide Internet to my PC with FREENAS and to MY LAPTOP.
Router is connected to my internet provider. Unfortunately MY Internet provider give me internet with NAT and not public IP. It's mean that my IP is not visabled from Internet. It is impossible to change it.

I am lucky beasue I have virtual machine in other place with root access and public IP.
Normally I have to make ssh tunellin from my FREENAS to my virtual machine(Debian ) for port 80:

ssh login@virtualmachine -R 80:localhost:80

then I can connect with my FREENAS from any place.

My question is how to do it automatic. FREENAS witll autostrat ssh tunnelin at boot and reconect when connection will be lost ? Or is there any other method to connect with my FREENAS?


I have FREENAS 9.3 - stable installed.

Thank you for any help
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
You could set this up as a startup script or cron task, but the answer is also in your thread title. Autossh is a tool that will create a tunnel and then monitor it. If the tunnel disconnects, it'll be restarted. Autossh isn't included in the base system (you could request it), but setting this up in a jail would be pretty easy. Once connected over the tunnel you should be able to ssh again to the main system from within the jail.
 
Status
Not open for further replies.
Top