OpenVPN 2.5.0 - Bat problem

Scripts with setup, destroy, and modify routing tables and firewall rulesets for client connections.
Post Reply
User avatar
vandreytrindade
OpenVpn Newbie
Posts: 13
Joined: Sun Jul 26, 2015 1:14 pm

OpenVPN 2.5.0 - Bat problem

Post by vandreytrindade » Mon Nov 16, 2020 11:48 am

Hi!
I'm trying to use a bat file to run when the user connects to the VPN.
I've been testing on my own ovpn file.
Added this two lines to it:

Code: Select all

script-security 2
up "C:\\Temp\\OpenVPN.bat"
Then the bat file has this content:

Code: Select all

net use * /delete /y
net use P: \\srvad\folder1
net use S: \\srvad\folder2
net use T: \\srvad\folder3
net use V: \\srvad\folder4
net use Z: \\srvad\folder5
And it isn't running, if I test with only one line, the connection even start, it says that there is a problem on the bat file.
I've used that commands without configuring the bat file and after the connection, it works fine.
My friend tried the same bat file on version 2.4.9 and it works as expected.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 8374
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN 2.5.0 - Bat problem

Post by TinCanTech » Mon Nov 16, 2020 3:14 pm

OpenVPN does not allow scripts executed by openvpn to pass data over the VPN.

User avatar
vandreytrindade
OpenVpn Newbie
Posts: 13
Joined: Sun Jul 26, 2015 1:14 pm

Re: OpenVPN 2.5.0 - Bat problem

Post by vandreytrindade » Thu Nov 19, 2020 5:09 pm

Hi TinCanTech,

It is a new thing then?
On version 2.4.9 it works.
Or maybe I'm trying to do it using a bad method.
Since my domain computers aren't authenticatin as users logon, I need to be able to map some network shared folders on their computers.

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 8374
Joined: Fri Jun 03, 2016 1:17 pm

Re: OpenVPN 2.5.0 - Bat problem

Post by TinCanTech » Thu Nov 19, 2020 7:10 pm

vandreytrindade wrote:
Thu Nov 19, 2020 5:09 pm
It is a new thing then?
On version 2.4.9 it works.
It is not new and was also the same in 2.4.9

Post Reply