How to call a script after a tunnel is fully established
Posted: Fri Sep 16, 2011 4:40 am
Hi all,
I have OpenVPN running in server mode. I have set up the --client-connect and --learn-address scripts and they are executing just fine.
Inside one of these scripts (either one) I want to use SSH to access the remote private VPN address over the VPN connection. The IP address of the remote is presented to the script. However, it seems that in both scripts, the tunnel is not fully established (it appears the routes have not been entered in to the VPN server).
How can I get a script called when a client connects and the tunnel is fully configured (i.e. routes added) such that an SSH to the IP address would make a successful connection?
It seems like another script option like "--tunnel-established" would be required...
Is there an easier way?
Thanks in advance for any thoughts,
- Steve
I have OpenVPN running in server mode. I have set up the --client-connect and --learn-address scripts and they are executing just fine.
Inside one of these scripts (either one) I want to use SSH to access the remote private VPN address over the VPN connection. The IP address of the remote is presented to the script. However, it seems that in both scripts, the tunnel is not fully established (it appears the routes have not been entered in to the VPN server).
How can I get a script called when a client connects and the tunnel is fully configured (i.e. routes added) such that an SSH to the IP address would make a successful connection?
It seems like another script option like "--tunnel-established" would be required...
Is there an easier way?
Thanks in advance for any thoughts,
- Steve