Page 1 of 1

Tunneling or pre-connect / post-disconnect scripts

Posted: Thu Sep 13, 2018 5:41 am
by steffen.heil
Hi

I am using openvpn via tcp but I have to tunnel the Connection through an ssh connection. I know that this is not recommended for performance reasons, but my environment does not allow otherwise and it is actually working quite good.

However I always have to start my ssh client (putty) first, then connect with openvpn. If the ssh connection breaks, I have to shut down everything and start everything again.
I would prefer to have a pre-connect script to start an ssh client and a post-disconnect script to stop that again.

Or even better, not use tcp but instead connect the two openvpn processes directly using ssh. (Using stdin and stdout instead of tcp read/write.)

Is there any way to archieve one of those ideas?

Best regards,
Steffen