Page 1 of 1

Script 'up' after accepting pushed settings

Posted: Wed Jul 22, 2015 1:15 am
by ogogon
I need to run a 'up' script on the client only after the setting routings, which came from the server.
Without this routings, service, who started from the script, can not make the necessary connections to it.

Here is a fragment of the log file.
Fri Jul 17 15:58:50 2015 /etc/openvpn/scripts/client.up tun0 1500 1542 10.10.100.16 10.10.100.15 init
mount error: could not resolve address for server1.net.ru: Unknown error
Fri Jul 17 15:59:15 2015 /usr/sbin/ip route add 10.10.100.0/24 via 10.10.100.15
Fri Jul 17 15:59:15 2015 /usr/sbin/ip route add 172.16.0.0/16 via 10.10.100.15
Fri Jul 17 15:59:15 2015 /usr/sbin/ip route add 172.17.0.0/16 via 10.10.100.15
Fri Jul 17 15:59:15 2015 /usr/sbin/ip route add 172.18.0.0/16 via 10.10.100.15
Fri Jul 17 15:59:15 2015 Initialization Sequence Completed
It is clearly seen that the first script is run, and then set routes that send from the server.

How can I execute the script only after will be installed all the changes that came with "push" from the server?

Ogogon.

Re: Script 'up' after accepting pushed settings

Posted: Thu Jul 23, 2015 9:15 am
by Traffic
The VPN is only marked as available once the --up script has completed .. therefore: you cannot use the --up script to connect to remote resources.

Re: Script 'up' after accepting pushed settings

Posted: Tue Sep 01, 2015 7:38 pm
by ogogon
Traffic wrote:The VPN is only marked as available once the --up script has completed .. therefore: you cannot use the --up script to connect to remote resources.
Is there a correct way to receive the signal that the resources are already available?

Ogogon.

Re: Script 'up' after accepting pushed settings

Posted: Mon Nov 23, 2015 9:29 pm
by Traffic
Not from within OpenVPN .. third party software may help.