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

How to customize and extend your OpenVPN installation.
Post Reply
lordofire
OpenVpn Newbie
Posts: 1
Joined: Fri May 07, 2021 5:08 am

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

Post by lordofire » Fri May 07, 2021 5:53 am

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.

new_user_13
OpenVpn Newbie
Posts: 2
Joined: Sat Sep 25, 2021 5:22 pm

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

Post by new_user_13 » Sat Sep 25, 2021 5:52 pm

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?

300000
OpenVPN Expert
Posts: 622
Joined: Tue May 01, 2012 9:30 pm

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

Post by 300000 » Fri Oct 01, 2021 7:15 am

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.

Post Reply