route-up on windows

How to customize and extend your OpenVPN installation.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
laurentHCM1
OpenVpn Newbie
Posts: 1
Joined: Tue Feb 23, 2021 9:19 am

route-up on windows

Post by laurentHCM1 » Mon Mar 15, 2021 9:10 am

Hi,

I apologize because I read many articles about the same problem but can find an answer.
I want to mount dynamically some shared folders from a NAS.
The list has to be dynamic.
So I wrote a script on the server-side which generates a script that contains all the net use.
net use x: \\X.X.X.X\folder1
net use y:\\X.X.X.Y\folder2
.....
On the client side, I added :
route-up script <script_to_mount>

and the script just contains the start
start \\X.X.X.X\<script_to_mount> which will perform the net use commands.

I see that the VPN launch the script by route-up , but nothing happens, it's just long as if there was a time-out.
And if you execute manually the script from a dos shell, everything is fine.

Do you have any idea ?

Thanks.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: route-up on windows

Post by TinCanTech » Mon Mar 15, 2021 2:50 pm

For security reasons, Openvpn does not allow any data to traverse the tunnel until all scripts have completed.

Therefore, your script cannot find the remote device.

Post Reply