Page 1 of 1

Trigger script after the connection is fully established and client could ping to server

Posted: Fri May 07, 2021 5:53 am
by lordofire
Hi there,

My requirement here is to trigger a script after the client has finished establishing the connection to server, after server is pingable from client. I have seen existing hooks like --up and --route-up, but neither of them provides server accessibility when the registered script is triggered. The system I'm using is ubuntu, and I think it is okay if we just skip openvpn hook and resort to systemd and trigger the script after an successful "sudo service openvpn@client start/restart", but I did not find a graceful solution on this either.

Please help and much appreciated.

Thanks.

Re: Trigger script after the connection is fully established and client could ping to server

Posted: Sat Sep 25, 2021 5:52 pm
by new_user_13
It is likely the most common question on this forum and a trap for young players. Does anyone have a hack to solve this isuue? What was the reason to even block internet access from rout-up script? Why no other post-up option were implemented?

Re: Trigger script after the connection is fully established and client could ping to server

Posted: Fri Oct 01, 2021 7:15 am
by 300000
What is name of your script you want to run after connection . If you write down so i can help you with that task.it is quite simple but so much trouble with openvpn . They said in order security tunnel ping over tunel is block untill finished establishing the connection .no script can run before that.