Page 1 of 1

Start program after connection

Posted: Wed Jan 09, 2019 1:36 pm
by peq
Hi Forum.
Not sure if I search this right - see please guide me in the right direction.
VPN Server: Debian9 OpenVPN
Clients: OpenVPN-Gui 11.7.0.0

I have some OpenVPN servers different places, but since there are many IP's in these setups - I would like the clients to open a webpage after successfull conection where all locally installed PLC etc are listed. This website I have running

So actually its sounds quite easy - But when I'm Connecting from Windows10 - with openVPN-Gui - I want a local browser on the Windows -to open a certain website.
How should I do this ?
in CMD - you can type

Code: Select all

start firefox http://DNS-IP
SHould it be a script placed on the Serverside - that'll push the command to the clients - or could I somehow add to the client-configuration that I want to run this script after successfull connection

Thanks in advance

Re: Start program after connection

Posted: Wed Jan 09, 2019 1:43 pm
by TinCanTech
https://community.openvpn.net/openvpn/w ... nPage#lbAS

--up is most likely what you want.

However, I don't know if it will do what you want because, by design, openvpn will not pass data over the VPN until all scripts have completed their execution.

Re: Start program after connection

Posted: Wed Jan 09, 2019 2:06 pm
by peq
As I understand - then it properly not will not work becarse no connection yet.
As I see this - i could only be with --route-up ( which is actually the last part of the connection)
But there's no way to make sure firefox is starting after the VPN is successfully connected - on the Windows Client using OpenVpn-Gui

Re: Start program after connection

Posted: Wed Jan 09, 2019 2:25 pm
by TinCanTech
The GUI has a pre-connect script ..